projects
/
platal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix networking display on profiles
[platal.git]
/
modules
/
platal.php
diff --git
a/modules/platal.php
b/modules/platal.php
index
5a161f6
..
2ad9317
100644
(file)
--- a/
modules/platal.php
+++ b/
modules/platal.php
@@
-1,6
+1,6
@@
<?php
/***************************************************************************
<?php
/***************************************************************************
- * Copyright (C) 2003-20
09
Polytechnique.org *
+ * Copyright (C) 2003-20
10
Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
@@
-132,10
+132,7
@@
class PlatalModule extends PLModule
if (Post::has('email_format')) {
$fmt = Post::s('email_format');
if (Post::has('email_format')) {
$fmt = Post::s('email_format');
- XDB::execute("UPDATE accounts
- SET email_format = {?}
- WHERE uid = {?}",
- $fmt, S::v('uid'));
+ S::user()->setEmailFormat($fmt);
S::set('email_format', $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
# 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
u
id = {?} AND FIND_IN_SET('bestalias', flags)",
S::user()->id());
$page->assign('bestalias', $res->fetchOneCell());
}
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
# 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
u
id = {?} AND FIND_IN_SET('bestalias', flags)",
S::user()->id());
$page->assign('bestalias', $res->fetchOneCell());
}
S::user()->id());
$page->assign('bestalias', $res->fetchOneCell());
}
@@
-318,7
+315,7
@@
class PlatalModule extends PLModule
$page->assign('ok', true);
$url = rand_url_id();
$page->assign('ok', true);
$url = rand_url_id();
- XDB::execute('INSERT INTO
perte_pas
s (certificat,uid,created)
+ XDB::execute('INSERT INTO
account_lost_password
s (certificat,uid,created)
VALUES ({?},{?},NOW())', $url, $user->id());
$res = XDB::query('SELECT email
FROM emails
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
{
global $globals;
// XXX: recovery requires data from the profile
- XDB::execute('DELETE FROM
perte_pas
s
+ XDB::execute('DELETE FROM
account_lost_password
s
WHERE DATE_SUB(NOW(), INTERVAL 380 MINUTE) > created');
$res = XDB::query('SELECT uid
WHERE DATE_SUB(NOW(), INTERVAL 380 MINUTE) > created');
$res = XDB::query('SELECT uid
- FROM
perte_pas
s WHERE certificat={?}', $certif);
+ FROM
account_lost_password
s WHERE certificat={?}', $certif);
$ligne = $res->fetchOneAssoc();
if (!$ligne) {
$page->changeTpl('platal/index.tpl');
$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);
SET password={?}
WHERE uid = {?} AND state = \'active\'',
$password, $uid);
- XDB::query('DELETE FROM
perte_pas
s
+ XDB::query('DELETE FROM
account_lost_password
s
WHERE certificat={?}', $certif);
// If GoogleApps is enabled, and the user did choose to use synchronized passwords,
WHERE certificat={?}', $certif);
// If GoogleApps is enabled, and the user did choose to use synchronized passwords,