frontend/models/RegistrationForm.php
/**
     * Registers new user in system.
     *
     * @return SkyUser|null the saved model or null if saving fails
     */
Registers new user in system.
@return SkyUser|null the saved model or null if saving fails
Registers new user in system . @return SkyUser|null the saved model or null if saving fails
public function register()
    {
        if (!$this->validate()) {
            return null;
        }
        \Yii::error(print_r($this, true));
        $user = new SkyUser();
        $user->firstname = $this->firstname;
        $user->lastname = $this->lastname;
        $user->patronymic = $this->patronymic;
        $user->email = $this->email;
        $user->legal_body = $this->legal_body;
        $user->private_enterpreneur = $this->private_enterpreneur;
        $user->tax_number = $this->tax_number;
        $user->company_name = $this->company_name;
        return $user->save() ? $user : null;
    }
public function register ( ) { if ( ! $ this -> validate ( ) ) { return null ; } \ Yii :: error ( print_r ( $ this , true ) ) ; $ user = new SkyUser ( ) ; $ user -> firstname = $ this -> firstname ; $ user -> lastname = $ this -> lastname ; $ user -> patronymic = $ this -> patronymic ; $ user -> email = $ this -> email ; $ user -> legal_body = $ this -> legal_body ; $ user -> private_enterpreneur = $ this -> private_enterpreneur ; $ user -> tax_number = $ this -> tax_number ; $ user -> company_name = $ this -> company_name ; return $ user -> save ( ) ? $ user : null ; }
Registers new user in system.
Registers new user in system .