benburwell / MCEMS-Site

:ambulance: EMS agency management web app. Handles applications, member records, certifications, and scheduling.
https://portal.bergems.org/
7 stars 2 forks source link

Some users are being logged in as 'optional' users #55

Open jmankhan opened 9 years ago

jmankhan commented 9 years ago

I'm having trouble finding the source of this bug from the files I've been working with. I don't think it's anything I've done since I can't replicate it on my branches, did @benburwell see anything like this? Eli has reported this about a week ago, and is now saying that some other users are also seeing this, although not all of them

benburwell commented 9 years ago

@EliRuss, can you tell me more specifically what they're seeing? I don't think there's any such thing as an "optional user" in bergems...

EliRuss commented 9 years ago

I login using my started "eruss" username. When I successfully login, my Eli Russ user profile is not the one I logged into, but rather the "OPTIONAL SHIFT" user profile. My Eli Russ user profile still shows up as a member on the list. This issue is that when I login it connects me to the OPTIONAL SHIFT user and not Eli Russ.

benburwell commented 9 years ago

Okay, I understand now. @jmankhan, I'd look at the member login route and see if there is any logic that could fail if there is a member in the database with a blank username (which I suspect is the case with the "optional shift" member).

As a temporary workaround, my guess is that assigning a username to optional shift would take care of it. We should still change the code though. Let me know if you have any other questions.

EliRuss commented 9 years ago

For clarification, I don't know the exact issues other members are having besides "scheduling issues." I will try to find out more this evening at our membership meeting and advise accordingly. Thanks, guys!

EliRuss commented 9 years ago

My issue has been resolved. Co-Technology Officer Justin Eigen simply resolved the problem and identified it as being that for some reason my user login was the same login as Optional Shift. I believe he also resolved other members minor issues (which were different than mine). Thank you!

benburwell commented 9 years ago

Okay, great. I think this is still a bug though, since we should not allow the system to get into such an unstable state. I thought usernames were enforced to be unique, but apparently this is not the case. @jmankhan, do you want to look into this?

jmankhan commented 9 years ago

I'll look at the code again, but I find that very strange. It seems like a database issue to me. I would like to talk to Justin if possible because I still can't reproduce the problem and so I'm having trouble visualizing what it was.