? auth/blacklist
Index: lib/authlib.php
===================================================================
RCS file: /cvsroot/moodle/moodle/lib/authlib.php,v
retrieving revision 1.8.2.8
diff -r1.8.2.8 authlib.php
322a323,338
>      * Pre-authentication hook.
>      * This method is called from login/index.php for all enabled auth plugins.
>      *
>      * @param object $user user object, later used for $USER
>      * @param string $username (with system magic quotes)
>      * @param string $password plain text password (with system magic quotes)
>      * @return object instance of auth_status
>      */
>     function preauthentication_hook($username, $password) {
>         //override if needed
>         $auth = new auth_status();
>         return $auth;
>     }
> 
> 
>     /**
384a401,418
> /**
>  * Keep the status of authentication in one place.
>  *
>  * This class could be fleshed out and used through the entire authentication 
>  * process.
>  */
> class auth_status {
>     /** must be either null or one of AUTH_OK, AUTH_FAIL, AUTH_DENIED, AUTH_ERROR */
>     var $status = null; # null is neutral
> 
>     /** optional message from plugin to explain $this->status */
>     var $message = '';
> 
>     /** optional error code */
>     var $errorcode = 0;
> }
> 
> 
Index: login/index.php
===================================================================
RCS file: /cvsroot/moodle/moodle/login/index.php,v
retrieving revision 1.129.2.10
diff -r1.129.2.10 index.php
120a121,131
>         foreach($authsequence as $authname) {
>             $authplugin = get_auth_plugin($authname);
>             $authstatus = $authplugin->preauthentication_hook($frm->username, $frm->password);
>             if ($authstatus->status === AUTH_DENIED) {
>                 $user = false;
>                 $frm = false;
>                 $errormsg = $authstatus->message;
>                 break; # Do not continue -- this $authstatus must be the final one coming out of preauth.
>             }
>         }
> 
122c133
<             //user already supplied by aut plugin prelogin hook
---
>             //user already supplied by auth plugin prelogin hook
233,235c244,251
<             if (empty($errormsg)) {
<                 $errormsg = get_string("invalidlogin");
<                 $errorcode = 3;
---
>             if (isset($authstatus) and isset($authstatus->status)) {
>                 $errormsg = $authstatus->message;
>                 $errorcode = $authstatus->errorcode;
>             } else {
>                 if (empty($errormsg)) {
>                     $errormsg = get_string("invalidlogin");
>                     $errorcode = 3;
>                 }
