/** * Revokes a User Right * * @param string $user_id * @param string $right * @return boolean */ public static function revoke_right($user_id, $right) { $error = new argent_error(); $db = new argent_database(); if (!self::object_exists($user_id)) { $error->add('1013', 'Invalid user account', $user_id, 'argent_uauth'); } $right_id = self::right_exists($right); if (!$right_id) { $error->add('1042', 'Invalid user right', $right, 'argent_uauth'); } if (!self::user_has_right($right, $user_id)) { return true; } return $user_right = argent_meta::unrelate($user_id, $right_id, 'user_right'); }