Forums
This topic is locked
how to restrict acces for same username?
Posted 12 Sep 2006 17:36:59
1
has voted
12 Sep 2006 17:36:59 Zoltan Djurak posted:
Greetings,i spent more then an hour on forum to find a solution how to restrict acces for same usernema at same time, so if im logged in to a restricted page noone else can use the logged in username. can someone hlp me out with this problem or post me a link to topic if i missed it...?
Thank you
(soory for my bad english, im hungarian)
DW | PHP | MySQL |
Edited by - zoolee on 12 Sep 2006 17:37:54
Replies
Replied 12 Sep 2006 19:10:43
12 Sep 2006 19:10:43 Roddy Dairion replied:
I did one where a user cannot access the same page at the same time. My system was design so that our staff is assigned a task on a page. If this user is logged in on page 1 and another comes in and try to access page one then it will give them a message "This page is currently in use by user1". Create a table, which can hold the user id, date and time and the page you wants to restrict access to. Then as soon as the user logs on to this page insert the user id and the page, and the date and time. Then for every activity you make within this page it checks the laps of time that went by if its more than 20 mins then it deletes the entry in that table thus allowing another user to access and its entry to log in that table. Now for everytime you do and activity on mine it was just cleansing customer details i.e. update customer details, for every successful update it updates the date and time. I sound like a heavy task but it quite easy. Hope that it will help you solve your problem.
Replied 13 Sep 2006 03:11:51
13 Sep 2006 03:11:51 Zoltan Djurak replied:
Thanks for tha fast answer, but i cant say that i fully understand what you have wrote, correct me if im wrong : this is like the very first step to restrict acces to page and restrict the same username to be used at same time?
Or my question wasnt formed enough "clear" (then i apologize!) <img src=../images/dmxzone/forum/icon_smile_sad.gif border=0 align=middle> the situation is the next : i have my login page, my table for user data, registration page, my restricted pages etc...everithing works perfect, ok almoust perfect <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle> , and the login sistem works, but if im login with my username, lets say "zoli" and im open another browser window, i can login again with acount "zoli", so there are to users with same acount at the same time.
And i cant figured out how should another table help me out with this problem, except if i join the user_id's or the id with session(?) and make some code for cheking is session alredy exist for the id or not...but i dont think that i have the proper knoledge for that <img src=../images/dmxzone/forum/icon_smile_sad.gif border=0 align=middle> Im using couple extensions in DW, but there is nowhere options like "chek if user is logged in"...or something like that, just those "chek uniqu" or "show if"...
(Im learning by my own using the internet and helps, tutorials what i can find, and im testing my skills on my localy installed server)
(soory for my bad english, im hungarian)
DW | PHP | MySQL |
Or my question wasnt formed enough "clear" (then i apologize!) <img src=../images/dmxzone/forum/icon_smile_sad.gif border=0 align=middle> the situation is the next : i have my login page, my table for user data, registration page, my restricted pages etc...everithing works perfect, ok almoust perfect <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle> , and the login sistem works, but if im login with my username, lets say "zoli" and im open another browser window, i can login again with acount "zoli", so there are to users with same acount at the same time.
And i cant figured out how should another table help me out with this problem, except if i join the user_id's or the id with session(?) and make some code for cheking is session alredy exist for the id or not...but i dont think that i have the proper knoledge for that <img src=../images/dmxzone/forum/icon_smile_sad.gif border=0 align=middle> Im using couple extensions in DW, but there is nowhere options like "chek if user is logged in"...or something like that, just those "chek uniqu" or "show if"...
(Im learning by my own using the internet and helps, tutorials what i can find, and im testing my skills on my localy installed server)
(soory for my bad english, im hungarian)
DW | PHP | MySQL |
Replied 13 Sep 2006 10:40:54
13 Sep 2006 10:40:54 Roddy Dairion replied:
thats it. my option was based on what i needed. What you need is basically to mark the user with a status log in or not logged in. if login then lock login id. But you need to setup the system so that your login time out when not in activity, and change your status from login or not logged in when not in activity.
Replied 13 Sep 2006 21:58:00
13 Sep 2006 21:58:00 Zoltan Djurak replied:
Thanx Roddy Dairion, basicaly this was what im looking for, ofcourse i dont know how to do it <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle> but with these indormations : "mark the user with a status logged in or not logged in. if login then lock login id" i will easily find the solution on the internet becouse i know what to search for.
Thanx again for your help
(soory for my bad english, im hungarian)
DW | PHP | MySQL |
Thanx again for your help
(soory for my bad english, im hungarian)
DW | PHP | MySQL |