diff options
author | Sarven Capadisli <csarven@controlyourself.ca> | 2009-02-12 18:30:10 +0000 |
---|---|---|
committer | Sarven Capadisli <csarven@controlyourself.ca> | 2009-02-12 18:30:10 +0000 |
commit | 033503dc84c5a31408345f61cd6c8ca79239e25b (patch) | |
tree | 7679efb9ccbdde739f29b1d8f7bb050956df5020 /actions/register.php | |
parent | 3c8c0572efef97c25037545e1e971f0ce3cd7cc8 (diff) | |
parent | ab8d27b8d1e25bd1058b904d03fedf97148f4b89 (diff) |
Merge branch '0.7.x' of git@gitorious.org:laconica/dev into 0.7.x
Diffstat (limited to 'actions/register.php')
-rw-r--r-- | actions/register.php | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/actions/register.php b/actions/register.php index 5d7a8ce69..aafb54ebb 100644 --- a/actions/register.php +++ b/actions/register.php @@ -223,10 +223,31 @@ class RegisterAction extends Action */ function nicknameExists($nickname) - { + { $user = User::staticGet('nickname', $nickname); return ($user !== false); } + + /** + * Handle old fashioned PEAR_Error msgs coming from DB_DataObject + * + * In this case nickname and email don't exist in the DB yet, + * so DB_DataObject throws an error. Overrided from Action. + * + * @param PEAR_Error + * + * @return nothing + */ + + function handleError($error) { + if ($error->getCode() == DB_DATAOBJECT_ERROR_NODATA) { + + // Do nothing. + + } else { + parent::handleError($error); + } + } /** * Does the given email address already exist? |