SiteController::actionRegister PHP Method

actionRegister() public method

Handles the registration of new users on the site
public actionRegister ( )
    public function actionRegister()
    {
        $this->layout = '//layouts/main';
        $this->setPageTitle(Yii::t('ciims.controllers.Site', '{{app_name}} | {{label}}', array('{{app_name}}' => Cii::getConfig('name', Yii::app()->name), '{{label}}' => Yii::t('ciims.controllers.Site', 'Sign Up'))));
        $model = new RegisterForm();
        if (Cii::get($_POST, 'RegisterForm', false)) {
            $model->attributes = $_POST['RegisterForm'];
            // Save the user's information
            if ($model->save()) {
                // Set a flash message
                Yii::app()->user->setFlash('success', Yii::t('ciims.controllers.Site', 'You have successfully registered an account. Before you can login, please check your email for activation instructions'));
                $this->redirect($this->createUrl('site/login'));
            }
        }
        $this->render('register', array('model' => $model));
    }