|
Title: Need tutorial on creating user management system Post by: thepreacher on January 19, 2007, 01:06:10 PM I need to implement a user management system where the MENU that is displayed is based ones' access level. I figure it will have to involve a database (MYSQL). Pardon me if the question is vague.
Thanks. Title: Re: Need tutorial on creating user management system Post by: VGR on January 20, 2007, 09:43:38 AM well, if it doesn't use a database, it will have to use some data storage means, like flat text files, hardcoded values in the code, etc
if you use a database, it's of course nicer, if simplier. It will also be more secure than a text file (even outside of the DOC_ROOT) if you take the necessary classical precautions. as to display a different menu based on "levels", habilitations etc of users, well it's the basis of all sites like this one or EEE.org where you registered also ;-) it usually involves session data (to keep track of who you are after you identified yourself) and the server-side scripts (say, PHP ;-) will simply test against $_SESSION['user_level'] or the like to display different menus etc that $_SESSION['user_level'] value is set from the database after you log in. Classically, you've a "users" table with all necessary attributes (id, name, pseudo, [address?, phone? occupation?], email, user_level, preferences, why not last_login, creationDT (Datetime), why not the last place you were in the previous time (althought this could be better placed in a user cookie, as it would require either updating the users table as soon as you "move" on to the site, or detecting the closing of the site in the user's browser, a task not completely unfeasible but perhaps unnecessarily complicated) simple, isn't it ?
Powered by SMF 1.1 RC2 |
SMF © 2001-2005, Lewis Media
Joomla Bridge by JoomlaHacks.com |