Page 1 of 9

[MODDB] Separate Login and User Name 1.0.6

Posted: Thu Aug 07, 2008 11:40 am
by nouveau
Modification Name: Seperate Login and User Name
Author: xceler8shun

Modification Description:: Aim of the modification is to replace the username used at login with a login name, similar to IPB. The user will then login with the login name they specify, however their username will be what is listed in the memberlist, posts, profile etc.
The login will only be known to the user and administrators and possibly moderators if they have relevant permissions.

This can also add another layer of security if someone tries to access a user account thinking that the username is the loginname, the attacker will be trying to access a name that doesn't authenticate, this is only however if the user creates a different username from their login name.

The login name will be able to be changed in the UCP or ACP and is permissions based to allow / disallow login name changes the same was as username permissions are set. Disallowing certain login names will also be possible in the User & Groups tab in the ACP with all actions logged in the relevant logs.

Login name to be specified on registration form.

Modification Version:: 1.0.6

Requirements: No special requirements just 3.0.5. I use Handyman's mod check modification with all mods I produce, so if you have that installed, this mod will also take advantage of that.
Features: See Below

Screenshots: Below
Demo URL: No Demo Yet
Demo Username: NA
Demo Password: NA

Modification Download: Separate Login and Username

MOD Format:
Image


ACP
  • Allow / disallow certain login names in User & Groups
  • Enable / disable and change login name setting in User Registration Settings
  • Logging of changes in relevant logs
  • Permissions to be set to allow users or groups to change their loginnames
  • A users login name can be changed via the admin panel in the user profile
UCP
  • Ability to change login name in account settings in UCP
  • Required to enter login name on registration
Template
  • Prosilver and Subsilver2 template changes completed.
Emails
  • Registration and activation / inactive email templates changed
A few admin screenshots
Image

Image

Image

Image

Image

Registration screenshot

Image

UCP screenshot

Image

Re: [RC1] Separate Login and User Name 0.0.1

Posted: Fri Aug 08, 2008 1:40 am
by ham1299
Awesome!I've been wanting this feature forever! I'll be installing this soon for sure! :D

Re: [RC1] Separate Login and User Name 0.0.1

Posted: Fri Aug 08, 2008 2:00 am
by nouveau
There are quite a few changes to be made and I have listed the install time at 30minutes for the install.xml, and 5 minutes for subsilver2, however it takes myself 28 to install everything, run the sql queries, run install.php file and clear the cache.

That is to say that I am familiar of where the code needs to go on this one, but others shouldn't have much trouble installing the MOD in around the same amount of time.

Re: [RC1] Separate Login and User Name 0.0.1

Posted: Fri Aug 08, 2008 3:13 am
by ham1299
Good to know. I'll make sure I have a good chunk of time to install it. Thanks! :)

Re: [RC1] Separate Login and User Name 0.0.2

Posted: Sat Aug 09, 2008 12:28 am
by nouveau
Updated the package after finding 2 minor errors. When making the install file, I left left a '$' off one line of code and a 'n' off another.

Should be right as reign now


install.php correction

find

Code: Select all

if (!disallow_loginnames_installed)
{
	trigger_error('NO_FILES_MODIFIED');
}
replace with

Code: Select all

if (!$disallow_loginnames_installed)
{
	trigger_error('NO_FILES_MODIFIED');
}
left the $ off at the start !disallow in the if statement, the module will still install though in the ACP

includes\functions_user.php correction

find

Code: Select all

	$username_clean = utf8_clean_string($user_row['username']);
after add

Code: Select all

	$loginname_clean = utf8_clean_string($user_row['loginname']);
in the install file, I left out a 'n' in loginname

Re: [RC1] Separate Login and User Name 0.0.2

Posted: Sat Aug 09, 2008 1:37 am
by ham1299
Well, good thing I haven't done anything with it yet! ;) Thanks.

Re: [RC1] Separate Login and User Name 0.0.2

Posted: Sat Aug 09, 2008 5:46 am
by nouveau
I was wondering why the development board was 100% and I received an error on the instructions. All good now though. :)

Re: [RC1] Separate Login and User Name 0.0.2

Posted: Sat Aug 09, 2008 8:18 pm
by startsmart
i've already install v 0.0.1 and i had login error:
when i tried to login into ACP, it returned me to the previous page and said that i can't re-authentication myself using different membership and now i can't login into ACP

phpbb 3.0.2 , localhost : xampp , style: Glacier

if this is a version bug, please tell me how to update to version 0.0.2 because i can't re-install it:
1- it takes long time to be installed
2 - i've install many mods after this, so i can't undo

Re: [DEV] Separate Login and User Name 0.0.2

Posted: Sun Aug 10, 2008 1:29 am
by nouveau
Sounds like a edit is missing as the changes from 0.0.1 to 0.0.2 don't affect an error like that.

Check your template edits to make sure you have LOGINNAME instead of USERNAME in the required spaces.

You may be trying to authenticate to the USERNAME field instead of LOGINNAME


Always back up your form before installing any mods, especially mods in development, and always test on a development board before using on a live forum.

Re: [DEV] Separate Login and User Name 0.0.2

Posted: Sun Aug 10, 2008 3:42 am
by ham1299
I was able to install it and test it. It works great! :D Thanks.

I do have a question about a couple of other MODs, though. Will this cause others to work incorrectly, such as:

User Reminder
Prime Notify PM

Do I need to change things associated with these, too? :?:

Re: [DEV] Separate Login and User Name 0.0.2

Posted: Sun Aug 10, 2008 4:12 am
by nouveau
It shouldn't do as the mod really only affects the login functions and leaves basically everything related to username on the rest of the board alone.

I'll have a look for you though.

Re: [DEV] Separate Login and User Name 0.0.2

Posted: Sun Aug 10, 2008 4:51 pm
by ham1299
Thanks! :)

Re: [DEV] Separate Login and User Name 0.0.3

Posted: Mon Aug 11, 2008 4:19 am
by nouveau
Have updated to revision 3

Please see first post for download link

All changes are in the install.xml file and there is also an update install file with instructions for those who need to go from 0.0.2 to 0.0.3

Changelog
* Added in checking so users cannot use someone elses login name as their username and vice versa.
* Included another area to turn mod on / off in ACP > Board Configuration > Board Features
* Included update file from 0.0.2 to 0.0.3

Re: [DEV] Separate Login and User Name 0.0.3

Posted: Tue Aug 12, 2008 5:58 am
by nouveau
ham1299 wrote:I was able to install it and test it. It works great! :D Thanks.

I do have a question about a couple of other MODs, though. Will this cause others to work incorrectly, such as:

User Reminder
Prime Notify PM

Do I need to change things associated with these, too? :?:
Will post up the changes required for the User Reminder MOD shortly in this post. I had a quick look at the changes required for the Prime PM notify MOD and don't believe either MOD will affect each others function.

open language\en\email\user_reminder_inactive_still.txt

find

Code: Select all

Username: {USERNAME}
add on a new line before

Code: Select all

Login name: {LOGINNAME}
---------------------------------------------------------------------------

open language\en\email\user_reminder_not_logged_in

find

Code: Select all

Username: {USERNAME}
add on a new line before

Code: Select all

Login name: {LOGINNAME}
---------------------------------------------------------------------------

open includes\functions_user_reminder.php

find x 4

Code: Select all

'name'		=> $row['username'],
add on a new line after

Code: Select all

'login'		=> $row['loginname'],
find

Code: Select all

'USERNAME'		=> htmlspecialchars_decode($addr['name']),
add on a new line after

Code: Select all

'LOGINNAME'		=> htmlspecialchars_decode($addr['login'])
---------------------------------------------------------------------------

open includes\acp\acp_user_reminder.php

find x 3

Code: Select all

'name'		=> $row['username'],
add on a new line after

Code: Select all

'login'		=> $row['loginname'],
find

Code: Select all

function not_logged_in($excl_user_id_ary, $excl_user_type_ary)
within function find

Code: Select all

'USER_ID'			=> $row['user_id'],
add on a new line before

Code: Select all

'LOGINNAME'			=> htmlspecialchars_decode($row['loginname']),
-------------------------

find

Code: Select all

function inactive_still($excl_user_id_ary, $excl_user_type_ary)
within function find

Code: Select all

'USER_ROW'			=> ( $row['user_lastvisit'] ) ? sprintf($user->lang['TIME_SPENT'],$lastvisit) : '-',
add on a new line before

Code: Select all

'LOGINNAME'			=> htmlspecialchars_decode($row['loginname']),
---------------------------------------------------------------------------

Clear the cache and the users login name should now be shown on the two emails edited and whose functions have been edited.

Re: [DEV] Separate Login and User Name 0.0.3

Posted: Wed Aug 20, 2008 1:22 pm
by andrade
Nice mod, but I had a problem because you've changed the username field to loginname field in auth matters. So when I've tried to use any joomla integration mod, it tried to use username instead of loginname. :(

It would be better if you just add a displayname field, but for this it will be necessary to change every username display template. :D Hard work.