public function controlAuthority($loggedUser, $name)
    {
        $this->find("name", $loggedUser);
        // IF AUTHORITY == admin, then continue
        if ($this->authority != "admin") {
            return ($this->name == $name);
        }
        return true;
    }
public function controlAuthority($loggedUser, $name)
    {
        $this->find("name", $loggedUser);
        // IF AUTHORITY == admin, then continue
        if ($this->authority != "admin") {
            return ($this->name == $name);
        }
        return true;
    }
public function controlAuthority ( $ loggedUser , $ name ) { $ this -> find ( "name" , $ loggedUser ) ; // IF AUTHORITY == admin, then continue if ( $ this -> authority != "admin" ) { return ( $ this -> name == $ name ) ; } return true ; }
Check if a post belongs to user


@return boolean
Check if a post belongs to user