summaryrefslogtreecommitdiff
path: root/demos/time-tracker/protected/App_Code/TrackerAuthManager.php
diff options
context:
space:
mode:
authorFabio Bas <ctrlaltca@gmail.com>2014-01-06 22:44:30 +0100
committerDavid <ottodavid@gmx.net>2014-08-21 17:21:19 +0200
commitdcaa0390c1d1335f47f0dd4b8784dc550e3d9f93 (patch)
treefcbf48afd7e8e2ff4811bcdfdc87d1145f855d51 /demos/time-tracker/protected/App_Code/TrackerAuthManager.php
parentfc0db15ebce101602fb1cbfa8f6a5cc0f8b58be4 (diff)
Removed all @version $Id comments: they were managed by svn and are useless with git
(cherry picked from commit 3e9969766153839abfb7de59e0c778a604bfbf55) Conflicts: framework/Web/UI/ActiveControls/TCallbackClientScript.php framework/Web/UI/JuiControls/TJuiAutoComplete.php framework/Web/UI/JuiControls/TJuiControlAdapter.php framework/Web/UI/JuiControls/TJuiDraggable.php framework/Web/UI/JuiControls/TJuiDroppable.php framework/Web/UI/JuiControls/TJuiResizable.php framework/Web/UI/JuiControls/TJuiSelectable.php framework/Web/UI/JuiControls/TJuiSortable.php
Diffstat (limited to 'demos/time-tracker/protected/App_Code/TrackerAuthManager.php')
-rwxr-xr-xdemos/time-tracker/protected/App_Code/TrackerAuthManager.php19
1 files changed, 9 insertions, 10 deletions
diff --git a/demos/time-tracker/protected/App_Code/TrackerAuthManager.php b/demos/time-tracker/protected/App_Code/TrackerAuthManager.php
index 48962167..08daae3f 100755
--- a/demos/time-tracker/protected/App_Code/TrackerAuthManager.php
+++ b/demos/time-tracker/protected/App_Code/TrackerAuthManager.php
@@ -4,7 +4,6 @@
* a string token saved in the cookie.
*
* @author Wei Zhuo <weizhuo[at]gmail[dot]com>
- * @version $Id: TrackerAuthManager.php 3189 2012-07-12 12:16:21Z ctrlaltca $
* @package Demos
* @since 3.1
*/
@@ -14,24 +13,24 @@ class TrackerAuthManager extends TAuthManager
* @const string signon token cookie name.
*/
const SignonCookieName = 'time-tracker-signon';
-
+
/**
* Performs the real authentication work. Overrides and calls parent
- * implementation. Trys to authenticate using token saved in cookie.
+ * implementation. Trys to authenticate using token saved in cookie.
* @param mixed parameter to be passed to OnAuthenticate event
*/
public function onAuthenticate($param)
{
parent::onAuthenticate($param);
- $currentUser = $this->Application->User;
+ $currentUser = $this->Application->User;
if(!$currentUser || $currentUser->IsGuest)
$this->authenticateFromCookie($param);
}
-
+
/**
* If the user is not set or is still a guest, try to authenticate the user
* using a string token saved in the cookie if any.
- * @param mixed parameter to be passed to OnAuthenticate event
+ * @param mixed parameter to be passed to OnAuthenticate event
*/
protected function authenticateFromCookie($param)
{
@@ -45,7 +44,7 @@ class TrackerAuthManager extends TAuthManager
$this->updateCredential($user);
}
}
-
+
/**
* Changes the user credentials.
* @param TUser new user details.
@@ -54,9 +53,9 @@ class TrackerAuthManager extends TAuthManager
{
$user->IsGuest = false;
$this->updateSessionUser($user);
- $this->Application->User = $user;
+ $this->Application->User = $user;
}
-
+
/**
* Generate a token to be saved in the cookie for later authentication.
* @param TimeTrackerUser user details.
@@ -70,7 +69,7 @@ class TrackerAuthManager extends TAuthManager
$cookie->Expire = strtotime('+1 month');
$this->Response->Cookies[] = $cookie;
}
-
+
/**
* Logs out the user and delete the token from cookie.
*/