From: Stéphane Jacob Date: Sat, 16 Apr 2011 19:03:31 +0000 (+0200) Subject: Set accounts to pending state upon validation. X-Git-Tag: xorg/1.1.1~37^2~5 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=4df10c3bc9c29578548160615ee9ded183dee23d;p=platal.git Set accounts to pending state upon validation. Signed-off-by: Stéphane Jacob --- 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);