protected function getUser() { if ($this->_user === null) { $this->_user = AdminUser::findByEmail($this->email); $this->_user = $this->_user ? $this->_user : false; } return $this->_user; }
public function down() { if ($user = AdminUser::findOne(['email' => self::INIT_ADMIN_EMAIL])) { $user->delete(); } }