Newscoop\Services\BlogService::isBlogger PHP Method

isBlogger() public method

Test if user is blogger
public isBlogger ( User $user ) : boolean
$user Newscoop\Entity\User
return boolean
    public function isBlogger(User $user)
    {
        foreach ($user->getGroups() as $group) {
            if ($this->config['role'] == $group->getId()) {
                if (count($user->getGroups()) == 1) {
                    return true;
                }
            }
        }
        return false;
    }