Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function actionRegister(){
- $model=new RegisterForm;
- if(isset($_POST['RegisterForm'])){
- $model->attributes=$_POST['RegisterForm'];
- if($model->validate()){
- $model1=new User;
- $model1->username = $model->name;
- $model1->password = $model->password;
- $model1->mail = $model->email;
- if($model1->save()){
- Yii::app()->user->setFlash('register','It worked!');
- $this->refresh();
- }
- }
- }
- $this->render('register',array('model'=>$model));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement