Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dynamic user creation failed - user name already exists #30

Open
gepparta opened this issue Apr 18, 2018 · 13 comments
Open

dynamic user creation failed - user name already exists #30

gepparta opened this issue Apr 18, 2018 · 13 comments

Comments

@gepparta
Copy link

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
Copy link
Contributor

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
Copy link
Author

She tried it again. but unfortunately with same result.

@gregorwolf
Copy link
Contributor

Please let her try again.

@gepparta
Copy link
Author

Gregor, Its working now :-)
Thanks a lot

@JohannesKonings
Copy link

JohannesKonings commented May 1, 2018

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
Copy link
Contributor

Hi @JohannesKonings please try again.

@JohannesKonings
Copy link

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
Copy link
Contributor

@hendrik77 reported a simmilar issue here: sapmentors/SITreg#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
Copy link

Thank you, that was the problem.

@CBasis
Copy link

CBasis commented May 1, 2018

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
Copy link

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
Copy link

CBasis commented May 1, 2018

@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
Copy link
Contributor

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

@gregorwolf gregorwolf reopened this May 1, 2018
gregorwolf added a commit that referenced this issue May 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants