You are not logged in.
Pages: 1
Hi everyone, I'm trying to activate the user using groovy script. I've tried different ways, but every time I've got the same error:
Script execution failed.
error message: javax.script.ScriptException: java.lang.StringIndexOutOfBoundsException: begin 0, end -1, length 12 (java.lang.StringIndexOutOfBoundsException)
script arguments:
file: t.groovy (id: 60335012, line 11)
line number: 11
Is anybody have a thoughts how to do this? Thanks
I'm using the following code:
import net.datenwerke.rs.passwordpolicy.service.activateuser.ActivateUserService
import net.datenwerke.security.service.usermanager.UserManagerService
import net.datenwerke.rs.passwordpolicy.service.BsiPasswordPolicyService
def userManagerService = GLOBALS.getRsService(UserManagerService.class)
def activateUserService = GLOBALS.getInstance(ActivateUserService)
def bsiPasswordPolicyService = GLOBALS.getInstance(BsiPasswordPolicyService)
def us = userManagerService.getUserByName('testtest')
activateUserService.activateAccount(us)
Last edited by eugenev (2024-10-16 11:03:00)
Offline
Hello,
I can in fact reproduce this bug. We have raised the issue RS-8735 to look further into it.
Kind regards,
Adrian
Offline
Pages: 1