From 95084a18f179b16362d059433326104af4d581c6 Mon Sep 17 00:00:00 2001 From: Pellaeon Lin Date: Sat, 13 Feb 2016 14:18:56 +0800 Subject: [PATCH] Fix# avoid deprecated \OCP\DB --- controller/registercontroller.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/controller/registercontroller.php b/controller/registercontroller.php index e30a98b..a4f6fbc 100644 --- a/controller/registercontroller.php +++ b/controller/registercontroller.php @@ -152,7 +152,7 @@ class RegisterController extends Controller { */ public function verifyToken($token) { $email = $this->pendingreg->findEmailByToken($token); - if ( \OCP\DB::isError($email) ) { + if ( $email === false ) { return new TemplateResponse('', 'error', array( 'errors' => array(array( 'error' => $this->l10n->t('Invalid verification URL. No registration request with this verification URL is found.'), @@ -169,7 +169,7 @@ class RegisterController extends Controller { */ public function createAccount($token) { $email = $this->pendingreg->findEmailByToken($token); - if ( \OCP\DB::isError($email) ) { + if ( $email === false ) { return new TemplateResponse('', 'error', array( 'errors' => array(array( 'error' => $this->l10n->t('Invalid verification URL. No registration request with this verification URL is found.'), @@ -225,7 +225,7 @@ class RegisterController extends Controller { // Delete pending reg request $res = $this->pendingreg->delete($email); - if ( \OCP\DB::isError($res) ) { + if ( $res === false ) { return new TemplateResponse('', 'error', array( 'errors' => array(array( 'error' => $this->l10n->t('Failed to delete pending registration request'),