PATH:
home
/
letacommog
/
letaweb
/
protected
/
modules
/
profile
/
models
<?php class ResetPassForm extends CFormModel { public $id; public $password; public $confirm_password; /** * @return array customized attribute labels (name=>label) */ public function attributeLabels() { return array( 'password' => 'Password', 'confirm_password' => 'Confirm password', ); } public function rules() { return array( array('confirm_password, password', 'required'), array('password', 'length', 'min' => 6), array('confirm_password', 'length', 'min' => 6), array('password', 'compare', 'compareAttribute' => 'confirm_password'), array('id, confirm_password, password', 'safe'), ); } public function save($item = null) { if ($this->validate()) { if (isset($this->id)) { $user = User::model()->findByPk($this->id); $user->password = crypt($this->password, Randomness::blowfishSalt()); $user->save(); return true; } } else { return false; } } }
[+]
..
[-] ResetPassForm.php
[edit]
[-] DeletePage1Form.php
[edit]
[-] PageForm.php
[edit]
[-] DeletePageForm.php
[edit]
[-] ChangeDomainForm.php
[edit]
[-] UserForm.php
[edit]
[-] ChangeSubDomainForm.php
[edit]