/** * @inheritdoc */ public function afterFind() { $this->currentPassword = $this->password; if (!$this->isNewRecord) { $this->password = ''; } parent::afterFind(); }