original_string: protected function validateStatusUser()
      {
          $field = 'user';
  
          if ($this->isExcluded($field)) {
              return null;
          }
  
          $value = $this->getSubmitted($field);
  
          if (is_numeric($value)) {
              $value = $this->user->get($value);
          }
  
          if (empty($value['status']) || empty($value['user_id'])) {
              $this->setErrorUnavailable($field, $this->translation->text('User'));
              return false;
          }
  
          $this->setSubmitted($field, $value);
          return true;
      }
code: protected function validateStatusUser()
      {
          $field = 'user';
  
          if ($this->isExcluded($field)) {
              return null;
          }
  
          $value = $this->getSubmitted($field);
  
          if (is_numeric($value)) {
              $value = $this->user->get($value);
          }
  
          if (empty($value['status']) || empty($value['user_id'])) {
              $this->setErrorUnavailable($field, $this->translation->text('User'));
              return false;
          }
  
          $this->setSubmitted($field, $value);
          return true;
      }
code_tokens: protected function validateStatusUser ( ) { $ field = 'user' ; if ( $ this -> isExcluded ( $ field ) ) { return null ; } $ value = $ this -> getSubmitted ( $ field ) ; if ( is_numeric ( $ value ) ) { $ value = $ this -> user -> get ( $ value ) ; } if ( empty ( $ value [ 'status' ] ) || empty ( $ value [ 'user_id' ] ) ) { $ this -> setErrorUnavailable ( $ field , $ this -> translation -> text ( 'User' ) ) ; return false ; } $ this -> setSubmitted ( $ field , $ value ) ; return true ; }
docstring: Validates user status
  @return boolean
docstring_tokens: Validates user status