public function init() { parent::init(); $model = $this->getModel(); if (empty($model->password)) { $this->exclude[] = 'password_current'; } }
public function isValid() { parent::isValid(); $this->authenticate(); return $this->hasErrors() === false; }