Hi ya Bob,
A quick question. Is there an easy way to have the DB id as the username on a new registration?
Ta
Ben
A quick question. Is there an easy way to have the DB id as the username on a new registration?
Ta
Ben
Hi Ben,
Quick answer is No - the table ID/Primary Key needs to be an auto-incremented integer for some of the Joomla! code to work with it. Also, users can change their usernames so you don't want to rely on that as an identifier. On the other hand, if you have the username it's easy to get the User ID and all the other info.
Quick answer is No - the table ID/Primary Key needs to be an auto-incremented integer for some of the Joomla! code to work with it. Also, users can change their usernames so you don't want to rely on that as an identifier. On the other hand, if you have the username it's easy to get the User ID and all the other info.
ahh... very good point... I might just use random numbers instead.
Thanks very much
Thanks very much
Hi cyberrock,
Sorry, I think I misunderstood your question :-( I thought that you were asking about using the Username as ID and not the other way round.
You could use the ID as Username - but I would not. It makes it too easy to guess at other possible usernames. A unique random string is OK (I have an action that will create that if it helps). Or you could use parts of their sign-up form if you have a name or something similar there, possibly plus a random string to avoid duplication e.g. john-smith-759
Bob
Sorry, I think I misunderstood your question :-( I thought that you were asking about using the Username as ID and not the other way round.
You could use the ID as Username - but I would not. It makes it too easy to guess at other possible usernames. A unique random string is OK (I have an action that will create that if it helps). Or you could use parts of their sign-up form if you have a name or something similar there, possibly plus a random string to avoid duplication e.g. john-smith-759
Bob
This topic is locked and no more replies can be posted.