mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2024-11-24 22:03:41 +00:00
Revert "Use Exceptions for User::create"
This commit is contained in:
parent
726db2c83f
commit
97844e1bab
1 changed files with 4 additions and 5 deletions
|
@ -177,12 +177,11 @@ function ldap_autocreateaccount($ldap_autocreateaccount, $username, $password, $
|
|||
if (empty($results)) {
|
||||
if (strlen($email) > 0 && strlen($name) > 0) {
|
||||
$arr = array('username' => $name, 'nickname' => $username, 'email' => $email, 'password' => $password, 'verified' => 1);
|
||||
|
||||
try {
|
||||
User::create($arr);
|
||||
$result = User::create($arr);
|
||||
if ($result['success']) {
|
||||
logger("ldapauth: account " . $username . " created");
|
||||
} catch (Exception $ex) {
|
||||
logger("ldapauth: account " . $username . " was not created ! : " . $ex->getMessage());
|
||||
} else {
|
||||
logger("ldapauth: account " . $username . " was not created ! : " . implode($result));
|
||||
}
|
||||
} else {
|
||||
logger("ldapauth: unable to create account, no email or nickname found");
|
||||
|
|
Loading…
Reference in a new issue