This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "quickfw".
The branch, master has been updated
via b3cff61f428e85c615718d8c7188428e4aa63a7d (commit)
from 04f1cd3bfec49c7b3c4d8aa2503ed70aeb0e0de2 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit b3cff61f428e85c615718d8c7188428e4aa63a7d
Author: Ivan1986 <iva...@li...>
Date: Thu Aug 12 11:36:48 2010 +0400
Добавлена функция logout в QuickFW_Auth
diff --git a/QFW/QuickFW/Auth.php b/QFW/QuickFW/Auth.php
index 0790576..1d65a17 100644
--- a/QFW/QuickFW/Auth.php
+++ b/QFW/QuickFW/Auth.php
@@ -55,7 +55,20 @@ class QuickFW_Auth
return false;
QFW::$router->redirect($redir);
}
-
+
+ /**
+ * Удаляет данные пользователя из сесии
+ *
+ * <br>Если пользователь залогинен, то его сессия удаляется
+ * <br>Если не залогинен, то ничего не делается
+ *
+ */
+ public function logout()
+ {
+ if (isset($_SESSION[$this->name]))
+ unset($_SESSION[$this->name]);
+ }
+
/**
* Старт сессии
*
@@ -71,7 +84,7 @@ class QuickFW_Auth
require (QFWPATH.'/QuickFW/Session.php');
self::$session = new QuickFW_Session($sid);
}
-
+
/**
* Рестарт сессии
*
@@ -88,7 +101,7 @@ class QuickFW_Auth
self::$session = new QuickFW_Session($sid);
return null;
}
-
+
/**
* Уничтожение сессии
*
@@ -100,7 +113,7 @@ class QuickFW_Auth
return;
self::$session->destroy(session_id());
}
-
+
/**
* Проверка авторизации и сохранение данных в сессии
*
@@ -126,7 +139,7 @@ class QuickFW_Auth
$this->userdata = & $_SESSION[$this->name];
QFW::$userdata = & $_SESSION[$this->name];
}
-
+
/**
* Простейшая проверка авторизации - имя и пароль в конфиге
*
@@ -153,6 +166,6 @@ class QuickFW_Auth
else
return false;
}
-
+
}
?>
\ No newline at end of file
-----------------------------------------------------------------------
Summary of changes:
QFW/QuickFW/Auth.php | 25 +++++++++++++++++++------
1 files changed, 19 insertions(+), 6 deletions(-)
hooks/post-receive
--
quickfw
|