mirror of
https://github.com/moodle/moodle.git
synced 2025-01-21 07:28:31 +01:00
faebaf0f40
pluggable modules in the 'auth' directory. Everything is done through authentication_user_login in lib/moodlelib.php As well as the old default "email" confirmation, I added a new type of confirmation "none", which basically does no confirmation at all.
20 lines
360 B
PHP
20 lines
360 B
PHP
<?PHP // $Id$
|
|
// Standard authentication function
|
|
|
|
function auth_user_login ($username, $password) {
|
|
// Returns true if the username and password work
|
|
// and false if they don't
|
|
|
|
global $CFG;
|
|
|
|
if (! $user = get_user_info_from_db("username", $username)) {
|
|
return false;
|
|
}
|
|
|
|
return ($user->password == md5($password));
|
|
}
|
|
|
|
|
|
|
|
?>
|