PATH:
home
/
letacommog
/
letaweb
/
protected
/
modules
/
profile
/
controllers
<?php class AccountController extends PController { public $layout = 'admin_column'; public function actionIndex() { $model = new UserForm('update'); if (isset($_POST['UserForm'])) { $model->attributes = $_POST['UserForm']; $model->password = 'password'; if ($model->save()) { Yii::app()->user->setFlash('profilechange_success', 'Account information has changed'); } } $id = $id = Yii::app()->user->getId(); $user = User::model()->findByPk($id); if ($user == null) { $url = $this->createUrl('index'); $this->redirect($url); } $attributes = array(); foreach ($model->getAttributes() as $name => $value) { $model->$name = $user->$name; } $passmodel = new ResetPassForm(); if (isset($_POST['ResetPassForm'])) { $passmodel->attributes = $_POST['ResetPassForm']; if ($passmodel->save()) { Yii::app()->user->setFlash('resetpassword_success', 'Password has changed'); } } $id = $id = Yii::app()->user->getId(); $user = User::model()->findByPk($id); if (is_null($user) || !isset($user)) { $url = $this->createUrl('index'); $this->redirect($url); } $passmodel->id = $id; $this->render('update', array('model' => $model, 'passmodel' => $passmodel)); } public function actionResetpassword() { $this->render('reset', array('model' => $model)); } public function actionCreate() { $model = new UserForm('create'); if (isset($_POST['UserForm'])) { $model->attributes = $_POST['UserForm']; if ($model->save()) { $url = $this->createUrl('index'); $this->redirect($url); } } $this->render('create', array('model' => $model)); } public function actionLogout() { Yii::app()->user->logout(); $url = $this->createAbsoluteUrl('/site/index'); $this->redirect($url, true); //$url = $this->createUrl('profile/login'); //$this->redirect($url); } public function actionLogin() { $this->render('login'); } }
[+]
..
[-] PurchaseController.php
[edit]
[-] AccountController.php
[edit]
[-] CheckoutController.php
[edit]
[-] PageController.php
[edit]