* 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 *
WHERE l.' . $login_type . ' = {?} AND a.state = \'active\'',
$login);
if (list($uid, $password) = $res->fetchOneRow()) {
WHERE l.' . $login_type . ' = {?} AND a.state = \'active\'',
$login);
if (list($uid, $password) = $res->fetchOneRow()) {
- $uid = $this->checkPassword($uname, $login, Post::v('response'), (!$redirect && is_numeric($uname)) ? 'id' : 'alias');
+ $uid = $this->checkPassword($uname, $login, Post::v('response'), (!$redirect && is_numeric($uname)) ? 'uid' : 'alias');
$res = XDB::query("SELECT a.uid, a.hruid, a.display_name, a.full_name,
a.sex = 'female' AS femme, a.email_format,
a.token, FIND_IN_SET('watch', a.flags) AS watch_account,
$res = XDB::query("SELECT a.uid, a.hruid, a.display_name, a.full_name,
a.sex = 'female' AS femme, a.email_format,
a.token, FIND_IN_SET('watch', a.flags) AS watch_account,
a.last_version, g.g_account_name IS NOT NULL AS googleapps,
UNIX_TIMESTAMP(s.start) AS lastlogin, s.host,
a.is_admin, at.perms
a.last_version, g.g_account_name IS NOT NULL AS googleapps,
UNIX_TIMESTAMP(s.start) AS lastlogin, s.host,
a.is_admin, at.perms
- FROM accounts AS a
- INNER JOIN account_types AS at ON(a.type = at.type)
- INNER JOIN watch AS w ON(w.uid = a.uid)
- LEFT JOIN forum_profiles AS fp ON(fp.uid = a.uid)
- LEFT JOIN gapps_accounts AS g ON(a.uid = g.l_userid AND g.g_status = 'active')
- LEFT JOIN #logger#.last_sessions AS ls ON (ls.uid = a.uid)
- LEFT JOIN #logger#.sessions AS s ON(s.id = ls.id)
+ FROM accounts AS a
+ INNER JOIN account_types AS at ON (a.type = at.type)
+ LEFT JOIN watch AS w ON (w.uid = a.uid)
+ LEFT JOIN forum_profiles AS fp ON (fp.uid = a.uid)
+ LEFT JOIN gapps_accounts AS g ON (a.uid = g.l_userid AND g.g_status = 'active')
+ LEFT JOIN log_last_sessions AS ls ON (ls.uid = a.uid)
+ LEFT JOIN log_sessions AS s ON(s.id = ls.id)
WHERE a.uid = {?} AND a.state = 'active'", $user->id());
if ($res->numRows() != 1) {
return false;
WHERE a.uid = {?} AND a.state = 'active'", $user->id());
if ($res->numRows() != 1) {
return false;
WHERE a.token = {?} AND l.alias = {?} AND l.type != \'homonyme\'',
$token, $login);
if ($res->numRows() == 1) {
WHERE a.token = {?} AND l.alias = {?} AND l.type != \'homonyme\'',
$token, $login);
if ($res->numRows() == 1) {