CMS  Version 3.9
password_reset.inc
Go to the documentation of this file.
1 <?php
2 Fakoli::using("user");
3 Fakoli::usingFeature("auto_form");
4 
5 $p_user = clone($user);
6 
7 $p_user->filter = new InclusionFilter("password");
8 
9 $form = new AutoForm($p_user);
10 $form->getRenderer("password")->forceReset = true;
11 $script .= $form->writeScript();
12 $form->submitLabel = "Save New Password";
13 //$form->passwordEncryptor = hashPassword;
14 
15 if ($method == "POST")
16 {
17  if ($form->save())
18  {
19  unset($_SESSION["login_redirect"]);
20 
21  $mgr = new UserManager();
22  $mgr->loginRedirect($user);
23  }
24 }
25 
26 ?>
27 <p>Please reset your password using the form below.</p>
28 <?
29 $form->drawForm();
30 ?>
static usingFeature()
Uses the specified framework feature(s).
Definition: core.inc:388
static using()
Import the datamodels, views and manifest for the specified component(s).
Definition: core.inc:116
Provides the interface to the user model for the application.
global $user
$method
Pull out a simple reference to the request method.
Definition: core.inc:1573
$form
$p_user
$script
$_SESSION["useMobile"]
Definition: override.inc:7