public function init() { parent::init(); $this->groups['registration'] = array_merge($this->groups['personalArea'], $this->groups['newRequest']); foreach ($this->groups[$this->scenario] as $name) { $this->{$name} = null; } switch ($this->scenario) { case 'login': $this->rememberMe = true; } }