library/Garp/Auth.php
public function getCurrentRole() {
        $role = self::DEFAULT_VISITOR_ROLE;
        if ($this->isLoggedIn()) {
            $role = self::DEFAULT_USER_ROLE;
            $data = $this->getUserData();
            if (isset($data[self::ROLE_COLUMN])) {
                $role = $data[self::ROLE_COLUMN];
            }
        }
        return $role;
    }
public function getCurrentRole() {
        $role = self::DEFAULT_VISITOR_ROLE;
        if ($this->isLoggedIn()) {
            $role = self::DEFAULT_USER_ROLE;
            $data = $this->getUserData();
            if (isset($data[self::ROLE_COLUMN])) {
                $role = $data[self::ROLE_COLUMN];
            }
        }
        return $role;
    }
public function getCurrentRole ( ) { $ role = self :: DEFAULT_VISITOR_ROLE ; if ( $ this -> isLoggedIn ( ) ) { $ role = self :: DEFAULT_USER_ROLE ; $ data = $ this -> getUserData ( ) ; if ( isset ( $ data [ self :: ROLE_COLUMN ] ) ) { $ role = $ data [ self :: ROLE_COLUMN ] ; } } return $ role ; }
Get the role associated with the current session.
Note that an anonymous session, where nobody is logged in also has a role associated with it.
@return String The role
Get the role associated with the current session . Note that an anonymous session where nobody is logged in also has a role associated with it .