General developer forum

Alternate login authentication only basis on UserName, Password not needed

 
Picture of Anirudha Barde
Alternate login authentication only basis on UserName, Password not needed
 

Hi,

I have to implement Login user on basis of UserName, if UserName is present in db then allow that user to log in.

Need help regarding this...

Thank you,

 
Average of ratings: -
Richard Jones
Re: Alternate login authentication only basis on UserName, Password not needed
Particularly helpful MoodlersPlugin developersTesters

Sounds like an interesting experiment!

How about using the username as the password?

Then see this discussion: https://moodle.org/mod/forum/discuss.php?d=5069

Richard

 
Average of ratings: Useful (1)
Picture of Anirudha Barde
Re: Alternate login authentication only basis on UserName, Password not needed
 

I have checked link you shared but I only want to login to moodle on basis of UserName if UserName is exists in moodle db then allow that user to login.

Or How can i modify "authenticate_user_login" method ? Or where "authenticate_user_login" method is located in moodle ?

 
Average of ratings: -
Richard Jones
Re: Alternate login authentication only basis on UserName, Password not needed
Particularly helpful MoodlersPlugin developersTesters

Understood.  If you modify the login form to show only the username, then you can set the password to be the same internally.

Setting the password to be the same as the username would be done when registering the user - you haven't explained how you register users.  One easy way to achieve that would be to have an external registration page tied to a non-Moodle database which is then used to authenticate.

May I ask why you want to do something like this?  Is it perhaps for very young children? On the face of it it sounds, shall we say, unsafe. Perhaps there are other solutions to your challenge?

 
Average of ratings: -