/** * A (backward compatibility) method to check if the currently active account * of an user matches. The difference between this method and isAccount() * is that this method gets integers as ACCOUNT TYPES * * This function takes either an array as the first parameter or * a variable number of parameters * * @todo Better docblock * * @static * @param mixed $accountType * @return bool */ function isAccountTypeId($accountTypeId) { if ($oUser = OA_Permission::getCurrentUser()) { $userAccountTypeId = OA_Permission::convertAccountTypeToId($oUser->aAccount['account_type']); return $userAccountTypeId & $accountTypeId; } return false; }