Skip to content
Snippets Groups Projects
Commit 1d096a10 authored by Andreas Gohr's avatar Andreas Gohr
Browse files

fixed password mail

There was an error which caused the mail aent on registration to
contain the crypted password instead of the cleartext one.

darcs-hash:20060217180715-7ad00-88b2e8f74ddbad41300ca53bbf79df3d8d8beebc.gz
parent e56b080e
No related branches found
No related tags found
No related merge requests found
......@@ -454,8 +454,7 @@ function register(){
}
//okay try to create the user
$pass = $auth->createUser($_POST['login'],$pass,$_POST['fullname'],$_POST['email']);
if(empty($pass)){
if(!$auth->createUser($_POST['login'],$pass,$_POST['fullname'],$_POST['email'])){
msg($lang['reguexists'],-1);
return false;
}
......
......@@ -189,8 +189,7 @@ class auth_basic {
* Create a new User [implement only where required/possible]
*
* Returns false if the user already exists, null when an error
* occured and the cleartext password of the new user if
* everything went well.
* occured and true if everything went well.
*
* The new user HAS TO be added to the default group by this
* function!
......
......@@ -165,8 +165,7 @@ class auth_mysql extends auth_basic {
* [public function]
*
* Create a new User. Returns false if the user already exists,
* null when an error occured and the cleartext password of the
* new user if everything went well.
* null when an error occured and true if everything went well.
*
* The new user will be added to the default group by this
* function if grps are not specified (default behaviour).
......@@ -195,7 +194,7 @@ class auth_mysql extends auth_basic {
$rc = $this->_addUser($user,$pwd,$name,$mail,$grps);
$this->_unlockTables();
$this->_closeDB();
if ($rc) return $pwd;
if ($rc) return true;
}
return null; // return error
}
......
......@@ -86,8 +86,7 @@ class auth_plain extends auth_basic {
* Create a new User
*
* Returns false if the user already exists, null when an error
* occured and the cleartext password of the new user if
* everything went well.
* occured and true if everything went well.
*
* The new user will be added to the default group by this
* function if grps are not specified (default behaviour).
......@@ -111,7 +110,7 @@ class auth_plain extends auth_basic {
$userline = join(':',array($user,$pass,$name,$mail,$groups))."\n";
if (io_saveFile(AUTH_USERFILE,$userline,true)) {
$this->users[$user] = compact('pass','name','mail','grps');
$this->users[$user] = compact('pass','name','mail','grps');
return $pwd;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment