@Throws(AppsForYourDomainException::class, ServiceException::class, IOException::class) fun restoreUser(username: String): UserEntry? { LOGGER.log(Level.INFO, "Restoring user '$username'.") val retrieveUrl = URL(domainUrlBase.toString() + "user/" + SERVICE_VERSION + "/" + username) val userEntry: UserEntry = userService.getEntry(retrieveUrl, UserEntry::class.java) userEntry.getLogin().setSuspended(false) val updateUrl = URL(domainUrlBase.toString() + "user/" + SERVICE_VERSION + "/" + username) return userService.update(updateUrl, userEntry) }
Restores a user . Note that executing this method for a user who is not suspended has no effect .