mirror of
https://github.com/moodle/moodle.git
synced 2025-02-18 23:05:30 +01:00
a single function called: get_complete_user_data() This is to help shibboleth but will also help when this function needs to be extended in future.
20 lines
357 B
PHP
20 lines
357 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_record('user', 'username', $username)) {
|
|
return false;
|
|
}
|
|
|
|
return ($user->password == md5($password));
|
|
}
|
|
|
|
|
|
|
|
?>
|