• Resolved jeffdworkin

    (@jeffdworkin)


    I want to build a site for consultants. Two pages. First page is a “waiting room” where visitors can chat among themselves. When the consultant logs in and arrives at a second page, a button on the first page “becomes live” and allows people in the first room to click that button and be taken to second page.

    Possible with your plug-in?

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor etoilewebdesign

    (@etoilewebdesign)

    Hi Jeff,

    It would likely require some custom coding to achieve the functionality you’re after. Probably not that much, though, if all you’re looking to do is check to see if someone’s logged in. We created a public function that allows you to check if someone’s logged in. You can learn more about this in our tutorial video here: https://www.youtube.com/watch?v=bKiJAjq7PhQ

    Thread Starter jeffdworkin

    (@jeffdworkin)

    I can see how to test if the current visitor is logged in, but now how to test if a specific user is logged in. There is not much in the way of documentation on line, is there some published some where.

    I want to build a button that, if the specific user is not logged in, it behaves one way, if the specific user is logged in it behaves another.

    All I need to know is how to query for the login state of that specific user.

    Thanks

    Plugin Contributor etoilewebdesign

    (@etoilewebdesign)

    Hi Jeff,

    As shown in the video, you can use the following to get the user ID:

    $FEUP = new FEUP_User;
    $User_ID = $FEUP->Get_User_ID();
    

    Then you could just create an IF statement to check for a specific user ID and to check for login. For example:

    if( $User_ID == 55 && $FEUP->Is_Logged_In() ) {
    //do something
    }
    
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Knowing if a specifc user is logged in’ is closed to new replies.