Jump to content

[SOLVED] Disconnect an other user


Jahren

Recommended Posts

Hi guys!

 

here goes question #3!

 

I am an admin and play around my account manager.

I've found out a user that needs to be shutdown for various reasons.

I've deleted the user in question but I would like him to get disconnected right away.

 

How can I nullify his $_SESSION['uname'] from the server?

 

In other words, Is there a way to manipulate someone else's SESSION vars.

I do have auth protection at login. But I won't reconnect to the database everytime a user loads a single page.

 

I just check if the $_SESSION['uname'] exists.

 

Again : Is there a way to play with the array of session vars?

Link to comment
Share on other sites

yeah, checking an ID seems a good alternative.

 

so I'd have a table of connected users.

a simple check of online users is far better than checking the whole auth table!

 

thanks!

 

edit : Tho it leads me to an other question

 

I put a userID in that table upon login

and remove it from the table on logout.

 

How can I remove users that have timed out?

 

edit2 : ahaha edit and reply at the same time :P

Link to comment
Share on other sites

I don't have a clue on how I can do this tho.

 

When would that be triggered?

Is there some sort of Event() when a session dies?

 

I guess you're right DarkWater ;)

 

Edit : I think i'll go with a counter system

i'll try to auth from the table every five pages you load or something

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.