src/AuthRoleTrait.php
protected function getRoleFromAuth(AuraAuth $auth)
    {
        if (! $auth->isValid()) {
            return $this->guestRole;
        }

        $data = $auth->getUserData();

        return isset($data[$this->roleKey])
            ? $data[$this->roleKey]
            : $this->memberRole;
    }
protected function getRoleFromAuth(AuraAuth $auth)
    {
        if (! $auth->isValid()) {
            return $this->guestRole;
        }

        $data = $auth->getUserData();

        return isset($data[$this->roleKey])
            ? $data[$this->roleKey]
            : $this->memberRole;
    }
protected function getRoleFromAuth ( AuraAuth $ auth ) { if ( ! $ auth -> isValid ( ) ) { return $ this -> guestRole ; } $ data = $ auth -> getUserData ( ) ; return isset ( $ data [ $ this -> roleKey ] ) ? $ data [ $ this -> roleKey ] : $ this -> memberRole ; }
Get Role from Auth

@param AuraAuth $auth Auth object

@return string

@access protected
Get Role from Auth