public function register()
    {
        if (!$this->validate()) {
            return false;
        }

        /** @var User $user */
        $user = Yii::createObject(ModelMapHelper::User());

        $user->setAttributes($this->attributes);

        $result = $user->register();
        if ($user->hasErrors()) {
            foreach ($user->errors as $attribute => $errors) {
                foreach ($errors as $error) {
                    $this->addError($attribute, $error);
                }
            }
        }

        return $result;
    }
public function register()
    {
        if (!$this->validate()) {
            return false;
        }

        /** @var User $user */
        $user = Yii::createObject(ModelMapHelper::User());

        $user->setAttributes($this->attributes);

        $result = $user->register();
        if ($user->hasErrors()) {
            foreach ($user->errors as $attribute => $errors) {
                foreach ($errors as $error) {
                    $this->addError($attribute, $error);
                }
            }
        }

        return $result;
    }
public function register ( ) { if ( ! $ this -> validate ( ) ) { return false ; } /** @var User $user */ $ user = Yii :: createObject ( ModelMapHelper :: User ( ) ) ; $ user -> setAttributes ( $ this -> attributes ) ; $ result = $ user -> register ( ) ; if ( $ user -> hasErrors ( ) ) { foreach ( $ user -> errors as $ attribute => $ errors ) { foreach ( $ errors as $ error ) { $ this -> addError ( $ attribute , $ error ) ; } } } return $ result ; }
Performs registration of user.
Returns User object on success or false on failure.

@return bool|User
@throws \yii\base\InvalidConfigException
Performs registration of user . Returns User object on success or false on failure .