public getAccountRoles ( integer $accountId ) : ArrayObject | ||
$accountId | integer | The ID of the account |
return | ArrayObject | Returns all account roles for the specified account. |
public function getAccountRoles($accountId)
{
$roles = new \ArrayObject(array());
$res = $this->db->Execute("SELECT `account_role_id` as `id` FROM `acl_account_roles` WHERE `account_id` = ?", array($accountId));
while ($rec = $res->FetchRow()) {
$roles[$rec['id']] = $this->getAccountRole($rec['id']);
}
return $roles;
}