/** * Overridden to encode the password * * @param $obj */ public function save($obj) { /** @var User $obj */ if ($obj->getPlainPassword()) { $obj->password = $this->encodePassword($obj, $obj->getPlainPassword()); } parent::save($obj); }
/** * @param UserEntity $userEntity */ public function connectWithUser(UserEntity $userEntity) { $userEntity->addLoginProvider($this->getLoginProviderEntity()); $this->userRepository->save($userEntity); }