Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter valosip

    (@valosip)

    So I ended up looping though and finding which user is logged in.

    But im sure there is an easier, faster way. please let me know if so:

    ` if (function_exists(“EWD_FEUP_Get_All_Users”)) {
    $Users = EWD_FEUP_Get_All_Users();
    }
    foreach ($Users as $User) {
    if($User->Is_Logged_In()){
    echo $User->Get_Username(). ” is logged in \n”;
    } else {
    echo $User->Get_Username(). ” is not logged in \n”;
    }
    }`

    Plugin Author Rustaurius

    (@rustaurius)

    Hi Valosip,

    I don’t think that there’s really a quicker way, if you’re trying to select the user from the users list.

    If not, you could create an individual user using:

    $User = FEUP_User();

    which will return the user object for the user currently on your site.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘check which user is logged in’ is closed to new replies.