Gentics Portal.Node PHP API
 All Classes Namespaces Functions Variables Pages
UserRecoveryPasswordChangeWidget.php
1 <?php
2 
4 {
5  /**
6  * Shows a particular model.
7  *
8  * @return void
9  */
10  public function run()
11  {
12  if (isset($_GET['email'], $_GET['activkey'])) {
13  $model = new UserChangePassword;
14 
15  if (($userChangePasswordData = Yii::app()->user->getState('UserChangePassword')) != null) {
16  $model->attributes = $userChangePasswordData['attributes'];
17  foreach ($userChangePasswordData['errors'] as $attribute => $errors) {
18  foreach ($errors as $e) {
19  $model->addError($attribute, $e);
20  }
21  }
22  Yii::app()->user->setState('UserChangePassword', null);
23  }
24 
25  $this->render('UserRecoveryPasswordChangeWidget', array('model' => $model, 'email' => $_GET['email'], 'activkey' => $_GET['activkey']));
26  return;
27  }
28  $this->render('UserRecoveryPasswordChangeWidget');
29 
30  }
31 }