diff --git a/inc/auth.php b/inc/auth.php index d8fae97b742a5a4b4f097aba0426ab941f0c9ae5..d25003736e560e03e570f53048e6095c601da680 100644 --- a/inc/auth.php +++ b/inc/auth.php @@ -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; } diff --git a/inc/auth/basic.class.php b/inc/auth/basic.class.php index b47a63de9e1cab755ffcb0ea1f4c111cb6d8b84e..6046edea1959645bbda33c71a223483ec39f4569 100644 --- a/inc/auth/basic.class.php +++ b/inc/auth/basic.class.php @@ -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! diff --git a/inc/auth/mysql.class.php b/inc/auth/mysql.class.php index fec617d56722498a625e9a63be5af7b9e619c524..bd8fc42c62b35a72ec9c1aba24f8377ded35a225 100644 --- a/inc/auth/mysql.class.php +++ b/inc/auth/mysql.class.php @@ -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 } diff --git a/inc/auth/plain.class.php b/inc/auth/plain.class.php index 2dae8de984a66e007db521928f698cb241ddb946..9ab3bc70a74a89d00c46834c880f4427382cac40 100644 --- a/inc/auth/plain.class.php +++ b/inc/auth/plain.class.php @@ -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; }