projects
/
platal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Implements export() and fromExport() for UF and some UFCs.
[platal.git]
/
classes
/
xorgsession.php
diff --git
a/classes/xorgsession.php
b/classes/xorgsession.php
index
4df4a40
..
f46107c
100644
(file)
--- a/
classes/xorgsession.php
+++ b/
classes/xorgsession.php
@@
-208,7
+208,7
@@
class XorgSession extends PlSession
}
// Loads uid and hruid into the session for developement conveniance.
}
// Loads uid and hruid into the session for developement conveniance.
- $_SESSION = array_merge($_SESSION, array('uid' => $user->id(), 'hruid' => $user->hruid));
+ $_SESSION = array_merge($_SESSION, array('uid' => $user->id(), 'hruid' => $user->hruid
, 'token' => $user->token, 'user' => $user
));
// Starts the session's logger, and sets up the permanent cookie.
if (S::suid()) {
// Starts the session's logger, and sets up the permanent cookie.
if (S::suid()) {
@@
-261,10
+261,9
@@
class XorgSession extends PlSession
public function tokenAuth($login, $token)
{
$res = XDB::query('SELECT a.uid, a.hruid
public function tokenAuth($login, $token)
{
$res = XDB::query('SELECT a.uid, a.hruid
- FROM aliases AS l
- INNER JOIN accounts AS a ON (l.uid = a.uid AND a.state = \'active\')
- WHERE a.token = {?} AND l.alias = {?} AND l.type != \'homonyme\'',
- $token, $login);
+ FROM accounts AS a
+ WHERE a.token = {?} AND a.hruid = {?} AND a.state = \'active\'',
+ $token, $login);
if ($res->numRows() == 1) {
return new User(null, $res->fetchOneAssoc());
}
if ($res->numRows() == 1) {
return new User(null, $res->fetchOneAssoc());
}