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

        /** @var User $user */
        $user = Yii::createObject(User::className());
        $user->setScenario('register');
        $this->loadAttributes($user);

        if (!$user->register()) {
            return false;
        }

        Yii::$app->session->setFlash(
                'info', Yii::t('user', 'Your account has been created and a message with further instructions has been sent to your email')
        );

        return true;
    }