From: Brion Vibber Date: Thu, 4 Feb 2010 21:08:34 +0000 (-0800) Subject: Should fix spurious 'nickname taken' and 'email taken' errors on registration. Form... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=239b88025ef1368bb871871ee903d6b078493f76;p=quix0rs-gnu-social.git 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) --- diff --git a/actions/register.php b/actions/register.php index 6981373467..ccab76cf01 100644 --- a/actions/register.php +++ b/actions/register.php @@ -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