Delete user GAM

0

Use GeneXus 15, .net and IIS. I delete a user GAM from the backend and when I want to register with the same user he says:

  

The GAM record already exists (42)

I saw that it remains in the User Table of GAM . It is a logical erasure. The question is:

Can I delete it definitively and then re-register with the same user?

I pass the event code:

Event Enter
    if Captcha1.ValidationResult=1
        If &GAMPassword = &GAMPasswordConf
            if &UsrId<>""
                //modo edicion
                &User.GUID          = &UsrId
            endif
            &User.Name          = &UsrId
            &User.EMail         = &UsrEmail
            &User.Birthday      = &UsrFechaNac
            &User.Password      = &GAMPassword

            &User.Save()

            If &User.Success() 
                &Usr.UsrId=&UsrId
                &Usr.UsrActivo=true //lo activo dentro de la webapp pero en GAM requiere activación via el link incrustado en el mail
                &Usr.UsrEmail=&UsrEmail
                &Usr.UsrFechaNac=&UsrFechaNac
                &Usr.UsrPaisCdg=&UsrPaisCdg
                &Usr.UsrUltFchHr=servernow()
                &Usr.Save() 
                if &Usr.Success()
                    Commit
                    &Repository = GAMRepository.Get()
                    If &Repository.UserActivationMethod = GAMUserActivationMethod.User
                        &ActivactionKey = &User.GetActivationKey(&Errors)
                        &CuerpoMail = GetBodyActivarUsuario.Udp(&ActivactionKey)
                        EnviarMail.Call(&UsrEmail,"Activación de usuario",&CuerpoMail)
                        Msg("Se envió un mail a "+&UsrEmail.Trim()+" para activar el usuario. Si no lo recibe en su bandeja, por favor revisar su carpeta SPAM.")
                    endif
                else
                    for &Message in &Usr.GetMessages()
                        NuevoLog.Call(&Pgmname + "#" + &Message.Description)
                    endfor
                endif
            else        
                &Errors = &User.GetErrors()
                Do 'DisplayMessages'
            endif
        Else
            Msg("La clave y su reingreso no coinciden.")
        Endif
    else
        Msg("Debe validar el captcha")
    endif
EndEvent
    
asked by bcamargo75 22.06.2017 в 21:15
source

1 answer

1

I should let you create another user with the same user ID. I recommend that you see it through GeneXus support because it seems to be an error.

    
answered by 26.06.2017 в 18:03