models/RegisterForm.php
public function afterSave($insert, $changedAttributes)
    {
        parent::afterSave($insert, $changedAttributes);
        if ($this->isActive()) {
            $loginForm = new LoginForm(['username' => $this->username]);
            $loginForm->login(false);
        }
    }
public function afterSave($insert, $changedAttributes)
    {
        parent::afterSave($insert, $changedAttributes);
        if ($this->isActive()) {
            $loginForm = new LoginForm(['username' => $this->username]);
            $loginForm->login(false);
        }
    }
public function afterSave ( $ insert , $ changedAttributes ) { parent :: afterSave ( $ insert , $ changedAttributes ) ; if ( $ this -> isActive ( ) ) { $ loginForm = new LoginForm ( [ 'username' => $ this -> username ] ) ; $ loginForm -> login ( false ) ; } }
Logs user in after registration.
@param boolean $insert
@param array $changedAttributes
Logs user in after registration .