From 4df10c3bc9c29578548160615ee9ded183dee23d Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Jacob?= Date: Sat, 16 Apr 2011 21:03:31 +0200 Subject: [PATCH] Set accounts to pending state upon validation. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Jacob --- include/validations/account.inc.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/validations/account.inc.php b/include/validations/account.inc.php index a2617a8..2cbc3cc 100644 --- a/include/validations/account.inc.php +++ b/include/validations/account.inc.php @@ -89,6 +89,10 @@ class AccountReq extends Validate public function commit() { $hash = rand_url_id(12); + XDB::execute('UPDATE accounts + SET state = \'pending\' + WHERE uid = {?}', + $this->uid); XDB::execute('INSERT INTO register_pending_xnet (uid, hruid, email, date, hash) VALUES ({?}, {?}, {?}, NOW(), {?})', $this->uid, $this->hruid, $this->email, $hash); -- 2.1.4