This topic is locked

how do YOU use dynamic permissions so users can edit username?

2/22/2017 10:25:09 AM
PHPRunner General questions
W
wfcentral author

I'm creating a product for a client where 2,500 clients will login and update their info.
I like using dynamic permissions because it gives me the ability to setup additional levels of access without rebuilding code.
I will set the initial username/password for these 2,500 users and then let them "retrieve password" so they can gain access to the system.
FIRST QUESTION

When dealing with a large group do you prefer to set usernames to something like firstname.lastname or first initial + lastname? This has the possibility of users having duplicate usernames...

or do you go with their email address as the username since it will be unique.
SECOND QUESTION

How do you handle a user who wants to change username - what if you go with email address and then they change their email address. By changing their username they are going to break the user assigned to groups in dynamic permissions since it uses the username to link.
I think the answer to #2 is to set all the permissions for these users as DEFAULT permissions - since I'm pretty sure those users do not have an assignment to group and them changing their username would not break the system?

jadachDevClub member 2/22/2017

I am actually building something similar right now.
When the admins create a new client, the new client receives an email with username and one time password.
The username is the client's last name plus the record ID (Smith10) so it will always be unique. The password is defaulted to "letmein". I add a flag field in the client table to recognize the password has not changed, therefore they are forced to change password when logging in the first time to something they like.
I am not keen on allowing the username to change. That can cause issues depending on how you use it.
So far it is working well.

W
wfcentral author 3/1/2017



I am actually building something similar right now.
When the admins create a new client, the new client receives an email with username and one time password.
The username is the client's last name plus the record ID (Smith10) so it will always be unique. The password is defaulted to "letmein". I add a flag field in the client table to recognize the password has not changed, therefore they are forced to change password when logging in the first time to something they like.
I am not keen on allowing the username to change. That can cause issues depending on how you use it.
So far it is working well.


thanks - that sounds like a great idea - I'll give that a shot.

T
thudsen 3/1/2017



thanks - that sounds like a great idea - I'll give that a shot.


I do the same, using some code to create the username from the client name and the record ID, so as admin sets up a new client record the username is automatically created.