From 239b88025ef1368bb871871ee903d6b078493f76 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Thu, 4 Feb 2010 13:08:34 -0800 Subject: [PATCH] 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) --- actions/register.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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