original_string: public function actionRevokeRole($idOrEmail, $role)
      {
          if (!$user = $this->findUser($idOrEmail)) {
              return self::EXIT_CODE_ERROR;
          }
          $rbac = Podium::getInstance()->getRbac();
          if (!$role = $rbac->getRole($role)) {
              $this->stderr('No such role.' . PHP_EOL);
              return self::EXIT_CODE_ERROR;
          }
          if (strpos($role->name, 'podium') === 0) {
              $defaultPodiumRole = $rbac->getRole(Rbac::ROLE_USER);
              $this->setPodiumUserRole($user, $defaultPodiumRole);
              $this->stdout("user#{$user->id} has role '{$defaultPodiumRole->name}'" . PHP_EOL);
          } else {
              $rbac->revoke($role, $user->id);
              $this->stdout("user#{$user->id} role '{$role->name}' revoked" . PHP_EOL);
          }
      }
code: public function actionRevokeRole($idOrEmail, $role)
      {
          if (!$user = $this->findUser($idOrEmail)) {
              return self::EXIT_CODE_ERROR;
          }
          $rbac = Podium::getInstance()->getRbac();
          if (!$role = $rbac->getRole($role)) {
              $this->stderr('No such role.' . PHP_EOL);
              return self::EXIT_CODE_ERROR;
          }
          if (strpos($role->name, 'podium') === 0) {
              $defaultPodiumRole = $rbac->getRole(Rbac::ROLE_USER);
              $this->setPodiumUserRole($user, $defaultPodiumRole);
              $this->stdout("user#{$user->id} has role '{$defaultPodiumRole->name}'" . PHP_EOL);
          } else {
              $rbac->revoke($role, $user->id);
              $this->stdout("user#{$user->id} role '{$role->name}' revoked" . PHP_EOL);
          }
      }
code_tokens: public function actionRevokeRole ( $ idOrEmail , $ role ) { if ( ! $ user = $ this -> findUser ( $ idOrEmail ) ) { return self :: EXIT_CODE_ERROR ; } $ rbac = Podium :: getInstance ( ) -> getRbac ( ) ; if ( ! $ role = $ rbac -> getRole ( $ role ) ) { $ this -> stderr ( 'No such role.' . PHP_EOL ) ; return self :: EXIT_CODE_ERROR ; } if ( strpos ( $ role -> name , 'podium' ) === 0 ) { $ defaultPodiumRole = $ rbac -> getRole ( Rbac :: ROLE_USER ) ; $ this -> setPodiumUserRole ( $ user , $ defaultPodiumRole ) ; $ this -> stdout ( "user#{$user->id} has role '{$defaultPodiumRole->name}'" . PHP_EOL ) ; } else { $ rbac -> revoke ( $ role , $ user -> id ) ; $ this -> stdout ( "user#{$user->id} role '{$role->name}' revoked" . PHP_EOL ) ; } }
docstring: Revokes specified forum user role, and sets default forum user role
  @param int|string $idOrEmail internal podium user id or email
  @param string $role one of 'podiumUser', 'podiumModerator', 'podiumAdmin' or other application defined role
docstring_tokens: Revokes specified forum user role and sets default forum user role