Recommend this page to a friend! |
Download .zip |
Info | View files (2) | Download .zip | Reputation | Support forum (1) | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2007-09-14 (9 years ago) | Not enough user ratings | Total: 718 | All time: 4,416 This week: 946 |
Version | License | PHP version | Categories | |||
bpt_sessionmanager 0.2 | GNU Lesser Genera... | 5.0 | PHP 5, User Management |
Description | Author | |
This class can be used to manage user access sessions. |
*** Use case *** Using this class is very simple, after you have included it, you have to call only $smngr = SessionManager::get_instance(); to obtain a SessionManager instance and automatically start a new session. If you want to verify if session starts correctly you can use this method $smngr->is_started(); You can manipulate registered variables using this method $smngr->var_is_registered("foo"); $smngr->register_var("foo","foo"); $smngr->get_var("foo"); $smngr->unregister_var("foo"); to clear all variables, just call $smngr->clear(); *** Protection Mode *** Protection mode is an easy way to ensure that some code run only after a condition is verified, for example a page that require a valid login. In this case, if user has submitted a valid login information you can use $smngr->start_protection() Now, in all pages that require a valid login, call $smngr->is_protected() to verify the condition. you can pass a url (e.g. "http://www.google.it") as parameter to is_protected() function if you want to force url redirection in case of test fail. |
Files |
File | Role | Description |
---|---|---|
BPT_SessionManager.class.php | Class | Main class file |
README.txt | Doc. | README |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
0% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.