X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fplatal.php;h=2ad93172685ba87f142fe22476825c0ddc23a2df;hb=8cc857c7ab92d78572877b5cf44fe19eff319159;hp=5a161f691b23f5755fd712e544fd59e52d8d783a;hpb=5660032ac785d410f90e3f5b0d6948dc90b0cfea;p=platal.git diff --git a/modules/platal.php b/modules/platal.php index 5a161f6..2ad9317 100644 --- a/modules/platal.php +++ b/modules/platal.php @@ -1,6 +1,6 @@ setEmailFormat($fmt); S::set('email_format', $fmt); } @@ -147,7 +144,7 @@ class PlatalModule extends PLModule # carva will extend to users not in the main domain. $res = XDB::query("SELECT alias FROM aliases - WHERE id = {?} AND FIND_IN_SET('bestalias', flags)", + WHERE uid = {?} AND FIND_IN_SET('bestalias', flags)", S::user()->id()); $page->assign('bestalias', $res->fetchOneCell()); } @@ -185,7 +182,7 @@ class PlatalModule extends PLModule # carva will extend to users not in the main domain. $res = XDB::query("SELECT alias FROM aliases - WHERE id = {?} AND FIND_IN_SET('bestalias', flags)", + WHERE uid = {?} AND FIND_IN_SET('bestalias', flags)", S::user()->id()); $page->assign('bestalias', $res->fetchOneCell()); } @@ -318,7 +315,7 @@ class PlatalModule extends PLModule $page->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 @@ -357,11 +354,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'); @@ -375,7 +372,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,