public function hasRole($role = "general")
	{
        $roleModel = new \erdiko\users\models\Role;
        $roleEntity = $roleModel->findByName($role);
        if (empty($roleEntity)) {
            throw  new \Exception("Error, role {$role} not found.");
        }
        $result = $this->_user->getRole() == $roleEntity->getId();

		return $result;
	}
public function hasRole($role = "general")
	{
        $roleModel = new \erdiko\users\models\Role;
        $roleEntity = $roleModel->findByName($role);
        if (empty($roleEntity)) {
            throw  new \Exception("Error, role {$role} not found.");
        }
        $result = $this->_user->getRole() == $roleEntity->getId();

		return $result;
	}
public function hasRole ( $ role = "general" ) { $ roleModel = new \ erdiko \ users \ models \ Role ; $ roleEntity = $ roleModel -> findByName ( $ role ) ; if ( empty ( $ roleEntity ) ) { throw new \ Exception ( "Error, role {$role} not found." ) ; } $ result = $ this -> _user -> getRole ( ) == $ roleEntity -> getId ( ) ; return $ result ; }
hasRole
returns true if current user has requested role

@param string

@return bool
hasRole returns true if current user has requested role