Re: Username same as user id

2018-05-07 Thread 'Anthony Flury' via Django users
Yes - but that is very different from what you are asking - Facebook have a two stage form - first set the details - and then set the user name. Their user name isn't optional - it is always mandatory - it is just set at stage two. You can assign any value to any variable you wish - this isn't

Re: Username same as user id

2018-05-07 Thread 'Anthony Flury' via Django users
Of course there is : on the view which responds to your registration form (likely to be where you call authenticate) - you simply test if the username field has been set when the registration is posted - and if not set it to be whatever you want. Or - in your custom backend you can do the sam

Re: Username same as user id

2018-05-06 Thread lakshitha kumara
Hello Jeni Thank you for your reply. yes i dealing with my own custom authentication backend and now i desided to use username as random number Instead of user id if username not set. Thanks you On Sunday, May 6, 2018 at 8:13:55 PM UTC+5:30, lakshitha kumara wrote: > > Hello guys > > Is the

Re: Username same as user id

2018-05-06 Thread Jani Tiainen
Hi, Have you considered using custom user with custom authentication backend to handle authentication? On Mon, May 7, 2018 at 3:56 AM, lakshitha kumara wrote: > hi anthony > > Look at the facebook registration form. there are no username field first > time user registration. but once user regis

Re: Username same as user id

2018-05-06 Thread lakshitha kumara
hi anthony Look at the facebook registration form. there are no username field first time user registration. but once user registered they can set username what they want. Thanks On Sunday, May 6, 2018 at 8:13:55 PM UTC+5:30, lakshitha kumara wrote: > > Hello guys > > Is there way to assig

Re: Username same as user id

2018-05-06 Thread 'Anthony Flury' via Django users
I can't imagine having an application where username is optional ... On 06/05/18 17:48, lakshitha kumara wrote: hi anthony Thank you for reply on this site username field not required field for userĀ  but its set as required field on backend so i need assing user id as as username if username

Re: Username same as user id

2018-05-06 Thread lakshitha kumara
hi anthony Thank you for reply on this site username field not required field for user but its set as required field on backend so i need assing user id as as username if username is empty for on registration submit. user can login with email phone and username Thanks On Sunday, May 6, 2