[Phpslash-commit] CVS: phpslash-dev/include/modules/auth slashAuth.class,1.2,1.3
Brought to you by:
joestewart,
nhruby
From: Joe S. <joe...@us...> - 2004-09-21 11:14:14
|
Update of /cvsroot/phpslash/phpslash-dev/include/modules/auth In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28895/phpslash-dev/include/modules/auth Modified Files: slashAuth.class Log Message: allow auto registration from external authentication Index: slashAuth.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/modules/auth/slashAuth.class,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** slashAuth.class 16 Sep 2004 21:05:07 -0000 1.2 --- slashAuth.class 21 Sep 2004 11:14:05 -0000 1.3 *************** *** 787,792 **** } ! // method to be overridden in child class ! // used by authtypes/slashAuthCR.class and authtypes/slashAuth.class function psl_validate($username, $password, $response, $user_info) { global $challenge; --- 787,821 ---- } ! /** ! * psl_register_authed - register in psl an externally authenticated user. ! * ! * @return void ! */ ! function psl_register_authed($ary) { ! ! // add new user ! $author = pslNew("Author"); ! if(empty($ary["password"])) { ! $ary["password"] = md5(uniqid($this->magic)); ! } ! if(empty($ary["permission"])) { ! $perm_ary['nobody'] = 20; ! $perm_ary['user'] = 21; ! $ary["permission"] = $perm_ary; ! } ! ! // use Author.class saveAuthor for account creation ! if ($author->saveAuthor($ary)) { ! // successful account creation ! return $ary; ! } else { ! // account creation failed ! $this->auth["error"] = pslgetText("User Registration failed"); ! return false; ! } ! ! } ! ! // dummy method to be overridden in child class function psl_validate($username, $password, $response, $user_info) { global $challenge; |