Welcome Guest, Not a member yet? Register   Sign In
How to awoid admin collision in CMS?
#1

[eluser]SPeed_FANat1c[/eluser]
Hi,

in my website I have multiple admin accounts (you can create as many admins as you want). I want to make that if one of the admins is connected, then the other would not be able to connect.

So when a user with status admin tries to connect the funtion 'is_admins_logged_in' would be executed.

If I want to chek is user logged in I do this:
Code:
function is_logged_in()
    {
        $is_logged_in = $this->session->userdata('is_logged_in');
        if(!isset($is_logged_in) || $is_logged_in != true)
        {

            return FALSE;
        }        
        else return TRUE;
    }
But with $this->session->userdata you can't check if the user with name 'admin' or with id = X is logged in. Any thoughts how to check if the particular user is logged in?
I am storing session in the database.


Messages In This Thread
How to awoid admin collision in CMS? - by El Forum - 06-15-2010, 09:04 AM
How to awoid admin collision in CMS? - by El Forum - 06-15-2010, 10:07 AM
How to awoid admin collision in CMS? - by El Forum - 06-15-2010, 11:10 AM
How to awoid admin collision in CMS? - by El Forum - 06-16-2010, 07:00 AM
How to awoid admin collision in CMS? - by El Forum - 06-16-2010, 07:21 AM
How to awoid admin collision in CMS? - by El Forum - 06-16-2010, 08:26 AM
How to awoid admin collision in CMS? - by El Forum - 06-17-2010, 03:16 AM



Theme © iAndrew 2016 - Forum software by © MyBB