SyncViews Posted April 12, 2008 Share Posted April 12, 2008 I know how to store (using mysql) and handel the basic stuff like emails, passwords, usernames etc but where do I start with implementing more dynamic stuff eg: -Which groups a user is a member of -Users access rights for each section (eg can they see the section, are they allowed to post there, do they have moderator rights there etc) Link to comment https://forums.phpfreaks.com/topic/100824-user-systems/ Share on other sites More sharing options...
amites Posted April 12, 2008 Share Posted April 12, 2008 when you want to do things like this your best bet is to add another field and another table the new field would reference the table by a unique_id the new table references the level of access or whatever you want to define, this is a poor explanation, though I can't think of any examples off the top of my head, the way I learned was to open up a simple open source program that has a similar function to what you want to do and then work backwards, figure out how they did it, and in the process gain understanding, if you have a specific example you'd like help with it will be easier to offer an explanation, most of it comes down to smart code, if (user.level >= group.minlevel) { do code } else { echo 'you do not have access to do this'; } though you can do much of that in mySQL which is optimized for that sort of thing, for getting started you can work with any specific idea and figure out how to get it to work once, doesn't matter how sloppy the code is, then work on ways to make it cleaner, and leaner Link to comment https://forums.phpfreaks.com/topic/100824-user-systems/#findComment-515629 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.