original_string: protected function processForm()
      {
          // Check job monitors as long as the login form is being processed
          $this->util->getMonitor()->checkMonitors();
  
          // Start the real work
          $this->loadForm();
  
          $orgId = null;
          if ($this->request->isPost()) {
              $orgId = $this->loginForm->getActiveOrganizationId();
  
              if ($orgId && ($this->currentUser->getCurrentOrganizationId() != $orgId)) {
                  $this->currentUser->setCurrentOrganization($orgId);
              }
          }
  
          if ($this->loginForm->wasSubmitted()) {
              $user = $this->loginForm->getUser();
  
              if ($this->loginForm->isValid($this->request->getPost(), false)) {
                  $user->switchLocale();
  
                  $this->loginStatusTracker
                          ->setPasswordText($this->loginForm->getPasswordText())
                          ->setUser($user);
  
                  return false;
              }
  
              $errors = \MUtil_Ra::flatten($this->loginForm->getMessages());
              // \MUtil_Echo::track($errors);
  
              // Also log the error to the log table  when the project has logging enabled
              $logErrors = join(' - ', $errors);
              $msg = sprintf(
                      'Failed login for : %s (%s) - %s',
                      $user->getLoginName(),
                      $user->getCurrentOrganizationId(),
                      $logErrors
                      );
              $this->accesslog->logChange($this->request, $msg);
          }
  
          return true;
      }
code: protected function processForm()
      {
          // Check job monitors as long as the login form is being processed
          $this->util->getMonitor()->checkMonitors();
  
          // Start the real work
          $this->loadForm();
  
          $orgId = null;
          if ($this->request->isPost()) {
              $orgId = $this->loginForm->getActiveOrganizationId();
  
              if ($orgId && ($this->currentUser->getCurrentOrganizationId() != $orgId)) {
                  $this->currentUser->setCurrentOrganization($orgId);
              }
          }
  
          if ($this->loginForm->wasSubmitted()) {
              $user = $this->loginForm->getUser();
  
              if ($this->loginForm->isValid($this->request->getPost(), false)) {
                  $user->switchLocale();
  
                  $this->loginStatusTracker
                          ->setPasswordText($this->loginForm->getPasswordText())
                          ->setUser($user);
  
                  return false;
              }
  
              $errors = \MUtil_Ra::flatten($this->loginForm->getMessages());
              // \MUtil_Echo::track($errors);
  
              // Also log the error to the log table  when the project has logging enabled
              $logErrors = join(' - ', $errors);
              $msg = sprintf(
                      'Failed login for : %s (%s) - %s',
                      $user->getLoginName(),
                      $user->getCurrentOrganizationId(),
                      $logErrors
                      );
              $this->accesslog->logChange($this->request, $msg);
          }
  
          return true;
      }
code_tokens: protected function processForm ( ) { // Check job monitors as long as the login form is being processed $ this -> util -> getMonitor ( ) -> checkMonitors ( ) ; // Start the real work $ this -> loadForm ( ) ; $ orgId = null ; if ( $ this -> request -> isPost ( ) ) { $ orgId = $ this -> loginForm -> getActiveOrganizationId ( ) ; if ( $ orgId && ( $ this -> currentUser -> getCurrentOrganizationId ( ) != $ orgId ) ) { $ this -> currentUser -> setCurrentOrganization ( $ orgId ) ; } } if ( $ this -> loginForm -> wasSubmitted ( ) ) { $ user = $ this -> loginForm -> getUser ( ) ; if ( $ this -> loginForm -> isValid ( $ this -> request -> getPost ( ) , false ) ) { $ user -> switchLocale ( ) ; $ this -> loginStatusTracker -> setPasswordText ( $ this -> loginForm -> getPasswordText ( ) ) -> setUser ( $ user ) ; return false ; } $ errors = \ MUtil_Ra :: flatten ( $ this -> loginForm -> getMessages ( ) ) ; // \MUtil_Echo::track($errors); // Also log the error to the log table  when the project has logging enabled $ logErrors = join ( ' - ' , $ errors ) ; $ msg = sprintf ( 'Failed login for : %s (%s) - %s' , $ user -> getLoginName ( ) , $ user -> getCurrentOrganizationId ( ) , $ logErrors ) ; $ this -> accesslog -> logChange ( $ this -> request , $ msg ) ; } return true ; }
docstring: Step by step form processing
  
  Returns false when $this->afterSaveRouteUrl is set during the
  processing, which happens by default when the data is saved.
  
  @return boolean True when the form should be displayed
docstring_tokens: Step by step form processing