Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
237 views
in Plugins by
Hello,

I would like to program a "switch to normal user in this session"-function for moderators and admins.

So I would program something like:

function qa_get_logged_in_user_field($field) {
    if ($field == 'level' && qa_user_level_maximum() >= QA_USER_LEVEL_MODERATOR && isset($_SESSION['switchToNormalUser']) {

        return QA_USER_LEVEL_APPROVED;
    }
    return qa_get_logged_in_user_field_base($field);
}

Is $_SESSION['switchToNormalUser'] possible or should I use another function?

Please log in or register to answer this question.

...