moodle/auth/none/lib.php
martin faebaf0f40 First implementation of new authentication system, which can now use
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.
2002-09-26 07:03:22 +00:00

18 lines
387 B
PHP

<?PHP // $Id$
// No authentication at all. This method approves everything!
function auth_user_login ($username, $password) {
// Returns true if the username doesn't exist yet
// Returns true if the username and password work
if (! $user = get_user_info_from_db("username", $username)) {
return true;
}
return ($user->password == md5($password));
}
?>