* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************/
-require_once dirname(__FILE__).'/../../classes/Session.php';
-
class XnetSession
{
// {{{ function init
- function init() {
+ public static function init() {
global $globals;
S::init();
- $_SESSION['session'] = new XnetSession;
-
if (!S::logged()) {
// prevent connexion to be linked to deconnexion
if (($i = strpos($_SERVER['REQUEST_URI'], 'exit')) !== false)
}
// }}}
- // {{{ function destroy()
+ // {{{ public static function destroy()
- function destroy() {
+ public static function destroy() {
S::destroy();
XnetSession::init();
}
// }}}
- // {{{ function doAuth()
+ // {{{ public static function doAuth()
/** Try to do an authentication.
*
* @param page the calling page (by reference)
*/
- function doAuth()
+ public static function doAuth()
{
if (S::identified()) { // ok, c'est bon, on n'a rien à faire
return true;
}
// }}}
+ // {{{ doAuthCookie
+
+ public static function doAuthCookie() {
+ return XnetSession::doAuth();
+ }
+
+ // }}}
// {{{ doAuthX
- function doAuthX() {
+ public static function doAuthX() {
global $globals, $page;
if (md5('1'.S::v('challenge').$globals->xnet->secret.Get::i('uid').'1') != Get::v('auth')) {
S::kill('loginX');
Get::kill('auth');
Get::kill('uid');
- $path = Get::v('p');
- Get::kill('p');
+ $path = Get::v('n');
+ Get::kill('n');
Get::kill('PHPSESSID');
$args = array();