public isTeamOwner ( integer $teamId = null ) : boolean | ||
$teamId | integer | The identifier of the team. |
return | 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;
}