StartupAPI / users

:zap: User management tool to be used in on-line projects. Includes admin dashboard.
http://www.StartupAPI.com/
MIT License
60 stars 24 forks source link

registration with email that is already registered #291

Closed JohnKey9 closed 5 years ago

JohnKey9 commented 5 years ago

If an email is already registered and anyone tries to register with a different username but same email, the system returns a fatal error.

sergeychernyshev commented 5 years ago

It's possible - conflict resolution might not be implemented properly - it might be throwing a unified exception that can be caught though.

sergeychernyshev commented 5 years ago

Can you provide more details - it looks like we are catching ExistingUserException, but it's possible that not all use-cases are caught.

JohnKey9 commented 5 years ago

Fatal error: Uncaught Error: Wrong parameters for ExistingUserException([string $message [, long $code [, Throwable $previous = NULL]]]) in /home/domains/vol4/524/2566524/user/htdocs/users/classes/AuthenticationModule.php:275 Stack trace: #0 /home/domains/vol4/524/2566524/user/htdocs/users/classes/AuthenticationModule.php(275): Exception->construct(Object(User), 'User already ex...') #1 /home/domains/vol4/524/2566524/user/htdocs/users/classes/AuthenticationModule.php(316): AuthenticationException->construct(Object(User), 'User already ex...', 0, Array) #2 /home/domains/vol4/524/2566524/user/htdocs/users/modules/usernamepass/index.php(295): ExistingUserException->__construct(Object(User), 'User already ex...', 0, Array) #3 /home/domains/vol4/524/2566524/user/htdocs/users/register.php(41): UsernamePasswordAuthenticationModule->processRegistration(Array, true) #4 {main} thrown in /home/domains/vol4/524/2566524/user/htdocs/users/classes/AuthenticationModule.php on line 275

JohnKey9 commented 5 years ago

you were right, error was a bit strange, I have reverted the files to the original version. thanks a lot for your help