[ Index ] |
PHP Cross Reference of Eventum |
[Source view] [Print] [Project Stats]
(no description)
File Size: | 566 lines (18 kb) |
Included or required: | 114 times |
Referenced: | 0 times |
Includes or requires: | 5 files include/class.date.php include/class.project.php include/class.user.php include/class.error_handler.php include/class.customer.php |
Auth:: (22 methods):
saveLoginAttempt()
getRequestedURL()
checkAuthentication()
isPendingUser()
isActiveUser()
hasCookieSupport()
hasValidCookie()
getCookieInfo()
isValidCookie()
createLoginCookie()
redirect()
removeCookie()
userExists()
isCorrectPassword()
getUserID()
getCurrentProject()
getCurrentProjectName()
getCurrentRole()
setCurrentProject()
createFakeCookie()
hashPassword()
setCookie()
saveLoginAttempt($email, $type, $extra = false) X-Ref |
Method used to save the login information into a log file. It will be useful for administrative purposes, so we know which customers were able to login. param: string $email The email associated with the user param: string $type Whether it was a successful login or not param: string $extra The reason for not being a successful login |
getRequestedURL() X-Ref |
Method used to get the requested URI for the 'current' page the user is trying to access. This is used to get the appropriate URL and save it if the user does not have the login cookie. return: string The requested URI for the current page |
checkAuthentication($cookie_name, $failed_url = NULL, $is_popup = false) X-Ref |
Method used to check for the appropriate authentication for a specific page. It will check for the cookie name provided and redirect the user to another page if needed. param: string $cookie_name The name of the cookie to check for param: string $failed_url The URL to redirect to if the user is not authenticated param: boolean $is_popup Flag to tell the function if the current page is a popup window or not return: void |
isPendingUser($email) X-Ref |
Method to check whether an user is pending its confirmation or not. param: string $email The email address to be checked return: boolean |
isActiveUser($email) X-Ref |
Method to check whether an user is active or not. param: string $email The email address to be checked return: boolean |
hasCookieSupport($cookie_name) X-Ref |
Method to check if the user has cookie support enabled in his browser or not. param: string $cookie_name The name of the cookie to check for return: boolean |
hasValidCookie($cookie_name) X-Ref |
Method to check if the user has a valid cookie. param: string $cookie_name The name of the cookie to check for return: boolean |
getCookieInfo($cookie_name) X-Ref |
Method used to get the unserialized contents of the specified cookie name. param: string $cookie_name The name of the cookie to check for return: array The unserialized contents of the cookie |
isValidCookie($cookie) X-Ref |
Method used to check whether a cookie is valid or not. param: array $cookie The unserialized contents of the cookie return: boolean |
createLoginCookie($cookie_name, $email) X-Ref |
Method used to create the login cookie in the user's machine. param: string $cookie_name The cookie name to be created param: string $email The email address to be stored in the cookie return: void |
redirect($new_url, $is_popup = false) X-Ref |
Method used to redirect people to another URL. param: string $new_url The URL the user should be redirected to param: boolean $is_popup Whether the current window is a popup or not return: void |
removeCookie($cookie_name) X-Ref |
Method used to remove a cookie from the user's browser. param: string $cookie_name The name of the cookie that needs to be deleted return: void |
userExists($email) X-Ref |
Checks whether an user exists or not in the database. param: string $email The email address to check for return: boolean |
isCorrectPassword($email, $password) X-Ref |
Checks whether the provided password match against the email address provided. param: string $email The email address to check for param: string $password The password of the user to check for return: boolean |
getUserID() X-Ref |
Gets the current user ID. return: integer The ID of the user |
getCurrentProject() X-Ref |
Gets the current selected project from the project cookie. return: integer The project ID |
getCurrentProjectName() X-Ref |
Gets the current project name from the user's project cookie. return: string The current project name |
getCurrentRole() X-Ref |
Gets the current role in the current project. return: integer The current role ID |
setCurrentProject($project, $remember) X-Ref |
Sets the current selected project for the user session. param: integer $project The project ID param: integer $remember Whether to automatically remember the setting or not return: void |
createFakeCookie($usr_id, $project = false) X-Ref |
Creates a fake cookie so processes not run from a browser can access current user and project param: integer $usr_id The ID of the user. param: integer $prj_id The ID of the project. |
hashPassword($password) X-Ref |
Hashes the password according to APP_HASH_TYPE constant param: string $password The plain text password return: string The hashed password |
setCookie($name, $value, $expiration) X-Ref |
Sets a cookie in the browser param: string $name The name of the cookie param: string $value The value of the cookie param: string $expiration The expiration data of the cookie |
Generated: Wed Dec 19 21:21:33 2007 | Cross-referenced by PHPXref 0.7 |