projects
/
platal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Activating 'hidden' visibility flag.
[platal.git]
/
classes
/
xorgsession.php
diff --git
a/classes/xorgsession.php
b/classes/xorgsession.php
index
d0efe9d
..
798d838
100644
(file)
--- a/
classes/xorgsession.php
+++ b/
classes/xorgsession.php
@@
-1,6
+1,6
@@
<?php
/***************************************************************************
<?php
/***************************************************************************
- * Copyright (C) 2003-201
1
Polytechnique.org *
+ * Copyright (C) 2003-201
4
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 *
@@
-138,10
+138,15
@@
class XorgSession extends PlSession
$user = User::getSilent($login);
$user = User::getSilent($login);
- if (!is_null($user) && S::suid()) {
- $success = (S::suid('uid') == $user->id());
+ if (is_null($user)) {
+ Platal::page()->trigError(self::TEXT_INVALID_LOGIN);
+ $success = false;
} else {
} else {
- $success = $this->checkPassword($login, $user, Post::v('response'));
+ if (S::suid()) {
+ $success = (S::suid('uid') == $user->id());
+ } else {
+ $success = $this->checkPassword($login, $user, Post::v('response'));
+ }
}
if ($success) {
}
if ($success) {
@@
-178,6
+183,13
@@
class XorgSession extends PlSession
$this->setAccessCookie(false, S::i('auth_by_cookie') != $user->id());
} else {
$this->killAccessCookie();
$this->setAccessCookie(false, S::i('auth_by_cookie') != $user->id());
} else {
$this->killAccessCookie();
+
+ // If login for an external website and not activating cookie,
+ // mark that we want to disconnect once external auth checks
+ // have been performed.
+ if (Post::b('external_auth')) {
+ S::set('external_auth_exit', true);
+ }
}
}
}
}