original_string: protected function getLoginRedirect(array $user)
      {
          $redirect = "account/{$user['user_id']}";
  
          if (!empty($user['role_redirect'])) {
              $redirect = $user['role_redirect'];
          }
  
          if ($this->user->isSuperadmin($user['user_id'])) {
              $redirect = 'admin';
          }
  
          return $redirect;
      }
code: protected function getLoginRedirect(array $user)
      {
          $redirect = "account/{$user['user_id']}";
  
          if (!empty($user['role_redirect'])) {
              $redirect = $user['role_redirect'];
          }
  
          if ($this->user->isSuperadmin($user['user_id'])) {
              $redirect = 'admin';
          }
  
          return $redirect;
      }
code_tokens: protected function getLoginRedirect ( array $ user ) { $ redirect = "account/{$user['user_id']}" ; if ( ! empty ( $ user [ 'role_redirect' ] ) ) { $ redirect = $ user [ 'role_redirect' ] ; } if ( $ this -> user -> isSuperadmin ( $ user [ 'user_id' ] ) ) { $ redirect = 'admin' ; } return $ redirect ; }
docstring: Returns a redirect path for the user
  @param array $user
  @return string
docstring_tokens: Returns a redirect path for the user