protected function canModerate()
    {
        $user = $this->getUser();

        if ($user->name == 'Guest' && $user->email == 'guest@example.com') {
            return false;
        }

        if (method_exists($user, 'can')) {
            return $user->can('forum-moderate');
        }

        // If no method of authorizing return false;
        return false;
    }
protected function canModerate()
    {
        $user = $this->getUser();

        if ($user->name == 'Guest' && $user->email == 'guest@example.com') {
            return false;
        }

        if (method_exists($user, 'can')) {
            return $user->can('forum-moderate');
        }

        // If no method of authorizing return false;
        return false;
    }
protected function canModerate ( ) { $ user = $ this -> getUser ( ) ; if ( $ user -> name == 'Guest' && $ user -> email == 'guest@example.com' ) { return false ; } if ( method_exists ( $ user , 'can' ) ) { return $ user -> can ( 'forum-moderate' ) ; } // If no method of authorizing return false; return false ; }
Determine if the user can moderate the forums.
@return boolean
Determine if the user can moderate the forums .