Scalr_Account_User::isTeamOwner PHP Метод

isTeamOwner() публичный Метод

Checks wheter this user is considered to be the team owner for the specified team.
Устаревший: This function has been deprecated since new ACL
public isTeamOwner ( integer $teamId = null ) : boolean
$teamId integer The identifier of the team.
Результат boolean Returns true if the user is considered to be the team owner for the specified team.
    public function isTeamOwner($teamId = null)
    {
        $ret = false;
        if ($teamId) {
            try {
                $team = Scalr_Account_Team::init();
                $team->loadById($teamId);
                $ret = $team->isTeamOwner($this->id);
            } catch (\Exception $e) {
            }
        } else {
            $ret = $this->canManageAcl();
        }
        return $ret;
    }