sapmentors / SITregParticipant

SAP Event Registration - Front end for Participants
Apache License 2.0
3 stars 11 forks source link

dynamic user creation failed - user name already exists #30

Open gepparta opened 6 years ago

gepparta commented 6 years ago

My colleague is trying to access this event: https://sitregparticipant-a5a504e08.dispatcher.hana.ondemand.com/index.html#/Events/47

Her s-user is S0018843662.

After Login she is getting following error:

leas - fehler 1 leas - fehler 2

Maybe this is relevant:

She is also entered as a co-organizer in https://sitregorganizer-a5a504e08.dispatcher.hana.ondemand.com/index.html#/Events/47

sap event organizer

gregorwolf commented 6 years ago

Please ask her to try again. I've enabled now the SAML Login for the account S0018843662 which seems to be created when you add the co-organizer. Unfortunately this user isn't created with the SAML configuration. Until now nobody was affected as Co-Organizers have used the app before as participants and where automatically created by accessing the participant UI.

gepparta commented 6 years ago

She tried it again. but unfortunately with same result.

gregorwolf commented 6 years ago

Please let her try again.

gepparta commented 6 years ago

Gregor, Its working now :-) Thanks a lot

JohannesKonings commented 6 years ago

I have the same error when I open https://sitregparticipant-a5a504e08.dispatcher.hana.ondemand.com/index.html

image

I'm not a Co-Organizer.

My S-User is S0018906781

gregorwolf commented 6 years ago

Hi @JohannesKonings please try again.

JohannesKonings commented 6 years ago

Thanks for the fast respond. I'm now a step further. But unfortunately I still can not register hier https://sitregparticipant-a5a504e08.dispatcher.hana.ondemand.com/index.html#/Events/51

image

gregorwolf commented 6 years ago

@hendrik77 reported a simmilar issue here: https://github.com/sapmentors/SITreg/issues/51. Please remove the @ before your Twitter username and it should work. The column is defined as a char 15 (https://github.com/sapmentors/SITreg/blob/master/data/SITreg.hdbdd#L108) as this is the maximum length of twitter usernames (afaik).

JohannesKonings commented 6 years ago

Thank you, that was the problem.

CBasis commented 6 years ago

Wondering if the twitter field is really the root cause. I was able to enter my twittername with a @ and got no error.

Seems that both is/was possible to enter as it can be seen in the list with both: image

-- update Ah, I got it! It was only in Johannes Twitterhandle because it was so close to the length limit. :)

JohannesKonings commented 6 years ago

you can add an @ if your twitter handle is less than 15 characters. My twitter handle + @ has 16 characters, which caused the error. If I get it right :)

CBasis commented 6 years ago

@JohannesKonings < Yes, after second reading I got it. :)

Now I am thinking about how to avoid this error in future:

Option A) Keep on allowing both entries (with or without the "@") to be entered and keep on saving that in the persistence layer ... like today .. then we need to enlarge the database field to length 16 to handle the 15char twitternames. => Pro: No need to change the application logic => Pro: All existing data is still valid => Cons: We will keep on having a mix in the list with both options, but this has no functional impact, because twitter url handles both formats correctly.

Option B) Remove the @ in case the entered twitter handle is 16chars long if (str.length > 15 && str.indexOf("@") > -1 ) Seems to be a bit dirty to me.
because it ends up in saving both formats to the database.

Option C) Silently remove the "@" in case it was entered before saving it in the database ... => Pro: No need to force the user to enter it the correct way => Pro: No need to change the table column length => Pro: Clean data in the table from that point of time .. better for later analytics on the twitter data => Con: changes in the sourcecode needed if (str.indexOf("@") > -1 )

My favorite is option is "C". Do you seen any other Pros/Cons, or another option .. or do you have a favorite?

gregorwolf commented 6 years ago

As a first easy fix I limit the field length to 15 and add the information that the username should be entered without @ screen shot 2018-05-01 at 15 15 45