forked from GNUsocial/gnu-social
Should fix spurious 'nickname taken' and 'email taken' errors on registration. Form's checks for existing nicks & emails would incorrectly return true on the second lookup due to bad interaction with negative caching.
(was checking $obj !== false but we return null now on negative cache hits, with false for cache misses)
This commit is contained in:
parent
5a1cbdc6f1
commit
239b88025e
@ -280,7 +280,7 @@ class RegisterAction extends Action
|
||||
function nicknameExists($nickname)
|
||||
{
|
||||
$user = User::staticGet('nickname', $nickname);
|
||||
return ($user !== false);
|
||||
return is_object($user);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -300,7 +300,7 @@ class RegisterAction extends Action
|
||||
return false;
|
||||
}
|
||||
$user = User::staticGet('email', $email);
|
||||
return ($user !== false);
|
||||
return is_object($user);
|
||||
}
|
||||
|
||||
// overrrided to add entry-title class
|
||||
|
Loading…
Reference in New Issue
Block a user