X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;ds=sidebyside;f=modules%2Fplatal.php;h=2c9596d87dc4c31d0150cefb7c2ccb298b761f2e;hb=1d49ff4ae684f13250408798f4b0a945797a5229;hp=b480a839a9703a1f214c029b454e6b02da871af7;hpb=e46cf8c46341b447cc3701c8afcc9baec3da11e5;p=platal.git diff --git a/modules/platal.php b/modules/platal.php index b480a83..2c9596d 100644 --- a/modules/platal.php +++ b/modules/platal.php @@ -1,6 +1,6 @@ assign('ok', true); $url = rand_url_id(); - XDB::execute('INSERT INTO perte_pass (certificat,uid,created) + XDB::execute('INSERT INTO account_lost_passwords (certificat,uid,created) VALUES ({?},{?},NOW())', $url, $user->id()); $res = XDB::query('SELECT email FROM emails @@ -363,11 +357,11 @@ Adresse de secours : " . Post::v('email') : "")); { global $globals; // XXX: recovery requires data from the profile - XDB::execute('DELETE FROM perte_pass + XDB::execute('DELETE FROM account_lost_passwords WHERE DATE_SUB(NOW(), INTERVAL 380 MINUTE) > created'); $res = XDB::query('SELECT uid - FROM perte_pass WHERE certificat={?}', $certif); + FROM account_lost_passwords WHERE certificat={?}', $certif); $ligne = $res->fetchOneAssoc(); if (!$ligne) { $page->changeTpl('platal/index.tpl'); @@ -381,7 +375,7 @@ Adresse de secours : " . Post::v('email') : "")); SET password={?} WHERE uid = {?} AND state = \'active\'', $password, $uid); - XDB::query('DELETE FROM perte_pass + XDB::query('DELETE FROM account_lost_passwords WHERE certificat={?}', $certif); // If GoogleApps is enabled, and the user did choose to use synchronized passwords,