diff options
Diffstat (limited to 'demos')
-rw-r--r-- | demos/blog/protected/Common/BlogUserManager.php | 12 | ||||
-rw-r--r-- | demos/chat/protected/App_Code/ChatUserManager.php | 12 | ||||
-rw-r--r-- | demos/time-tracker/protected/App_Code/UserManager.php | 12 |
3 files changed, 18 insertions, 18 deletions
diff --git a/demos/blog/protected/Common/BlogUserManager.php b/demos/blog/protected/Common/BlogUserManager.php index 5d1007cf..931b09db 100644 --- a/demos/blog/protected/Common/BlogUserManager.php +++ b/demos/blog/protected/Common/BlogUserManager.php @@ -80,15 +80,15 @@ class BlogUserManager extends TModule implements IUserManager }
/**
- * Validates if the username and password are correct.
- * @param string user name
- * @param string password
- * @return boolean true if validation is successful, false otherwise.
+ * Returns a user instance according to auth data stored in a cookie.
+ * @param THttpCookie the cookie storing user authentication information
+ * @return TUser the user instance generated based on the cookie auth data, null if the cookie does not have valid auth data.
+ * @since 3.1.1
*/
- public function validateUser($username,$password)
+ public function getUserFromCookie($cookie);
{
// do nothing since we don't support cookie-based auth in this example
- return false;
+ return null;
}
}
diff --git a/demos/chat/protected/App_Code/ChatUserManager.php b/demos/chat/protected/App_Code/ChatUserManager.php index 495a151d..ff751f2b 100644 --- a/demos/chat/protected/App_Code/ChatUserManager.php +++ b/demos/chat/protected/App_Code/ChatUserManager.php @@ -69,15 +69,15 @@ class ChatUserManager extends TModule implements IUserManager }
/**
- * Validates if the username and password are correct.
- * @param string user name
- * @param string password
- * @return boolean true if validation is successful, false otherwise.
+ * Returns a user instance according to auth data stored in a cookie.
+ * @param THttpCookie the cookie storing user authentication information
+ * @return TUser the user instance generated based on the cookie auth data, null if the cookie does not have valid auth data.
+ * @since 3.1.1
*/
- public function validateUser($username,$password)
+ public function getUserFromCookie($cookie);
{
// do nothing since we don't support cookie-based auth in this example
- return false;
+ return null;
}
}
diff --git a/demos/time-tracker/protected/App_Code/UserManager.php b/demos/time-tracker/protected/App_Code/UserManager.php index 4d4ce75c..769e2463 100644 --- a/demos/time-tracker/protected/App_Code/UserManager.php +++ b/demos/time-tracker/protected/App_Code/UserManager.php @@ -75,15 +75,15 @@ class UserManager extends TModule implements IUserManager }
/**
- * Validates if the username and password are correct.
- * @param string user name
- * @param string password
- * @return boolean true if validation is successful, false otherwise.
+ * Returns a user instance according to auth data stored in a cookie.
+ * @param THttpCookie the cookie storing user authentication information
+ * @return TUser the user instance generated based on the cookie auth data, null if the cookie does not have valid auth data.
+ * @since 3.1.1
*/
- public function validateUser($username,$password)
+ public function getUserFromCookie($cookie);
{
// do nothing since we don't support cookie-based auth in this example
- return false;
+ return null;
}
}
|