We are transitioning over to a new forum platform. Please post new issues there. Existing threads will be dealt with here unless you choose to move them over. Visit the new forum


Thread tagged as: Question, Runway

Check for Perch user


Is there anyway to check that a Perch user is logged into admin? I'd like to add help pages that are only accessible to editors.

Many thanks in advance,


Jonathan Elliman

Jonathan Elliman 27 points

  • 2 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

$Users = new PerchUsers;
$CurrentUser = $Users->get_current_user();

if (is_object($CurrentUser) && $CurrentUser->logged_in()) {
    // ... user is logged in

Fantastic. Thanks Drew!