original_string: public function actionAssignRole($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) {
              $this->setPodiumUserRole($user, $role);
          } else {
              $rbac->assign($role, $user->id);
          }
          $this->stdout("user#{$user->id} has role '{$role->name}'" . PHP_EOL);
      }
code: public function actionAssignRole($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) {
              $this->setPodiumUserRole($user, $role);
          } else {
              $rbac->assign($role, $user->id);
          }
          $this->stdout("user#{$user->id} has role '{$role->name}'" . PHP_EOL);
      }
code_tokens: public function actionAssignRole ( $ 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 ) { $ this -> setPodiumUserRole ( $ user , $ role ) ; } else { $ rbac -> assign ( $ role , $ user -> id ) ; } $ this -> stdout ( "user#{$user->id} has role '{$role->name}'" . PHP_EOL ) ; }
docstring: Changes 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: Changes forum user role .