original_string: public function showReset(string $reset_code = null)
      {
          if ($reset_code === null) {
              if (isset($_GET['template']) === false) {
                  return redirect($this->router->generate('login-page') . "?m=3");
              } else {
                  return 'Redirect: ' . $this->router->generate('login-page') . "?m=3";
              }
          }
          $user = Model\User::where("reset_code", $reset_code)->first();
          if ($user === null) {
              if (isset($_GET['template']) === false) {
                  return redirect($this->router->generate('login-page') . "?m=3");
              } else {
                  return 'Redirect: ' . $this->router->generate('login-page') . "?m=3";
              }
          }
  
          return $this->templates->render("Auth::Reset", [
              "messages" => [
                  'error' => '',
                  'info' => '',
                  'success' => '',
                  'warning' => ''
              ]
          ]);
      }
code: public function showReset(string $reset_code = null)
      {
          if ($reset_code === null) {
              if (isset($_GET['template']) === false) {
                  return redirect($this->router->generate('login-page') . "?m=3");
              } else {
                  return 'Redirect: ' . $this->router->generate('login-page') . "?m=3";
              }
          }
          $user = Model\User::where("reset_code", $reset_code)->first();
          if ($user === null) {
              if (isset($_GET['template']) === false) {
                  return redirect($this->router->generate('login-page') . "?m=3");
              } else {
                  return 'Redirect: ' . $this->router->generate('login-page') . "?m=3";
              }
          }
  
          return $this->templates->render("Auth::Reset", [
              "messages" => [
                  'error' => '',
                  'info' => '',
                  'success' => '',
                  'warning' => ''
              ]
          ]);
      }
code_tokens: public function showReset ( string $ reset_code = null ) { if ( $ reset_code === null ) { if ( isset ( $ _GET [ 'template' ] ) === false ) { return redirect ( $ this -> router -> generate ( 'login-page' ) . "?m=3" ) ; } else { return 'Redirect: ' . $ this -> router -> generate ( 'login-page' ) . "?m=3" ; } } $ user = Model \ User :: where ( "reset_code" , $ reset_code ) -> first ( ) ; if ( $ user === null ) { if ( isset ( $ _GET [ 'template' ] ) === false ) { return redirect ( $ this -> router -> generate ( 'login-page' ) . "?m=3" ) ; } else { return 'Redirect: ' . $ this -> router -> generate ( 'login-page' ) . "?m=3" ; } } return $ this -> templates -> render ( "Auth::Reset" , [ "messages" => [ 'error' => '' , 'info' => '' , 'success' => '' , 'warning' => '' ] ] ) ; }
docstring: Show the password reset page
docstring_tokens: Show the password reset page