コード例 #1
0
ファイル: UserForm.php プロジェクト: andrelinoge/rezydent
 public static function getInstance($id = NULL)
 {
     $form = new UserForm();
     if ($id) {
         $user = User::model()->findByPk($id);
         if ($user) {
             $form->attributes = $user->attributes;
             $form->unsetAttributes(array('password'));
             $form->_userModel = $user;
         }
     }
     return $form;
 }