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

Allow two users to have the same email address #1

Open
jedateach opened this issue Feb 1, 2015 · 1 comment
Open

Allow two users to have the same email address #1

jedateach opened this issue Feb 1, 2015 · 1 comment

Comments

@jedateach
Copy link

When attempting to use this in production, I got errors from users who had the same email address as other users.

[Error] Uncaught ValidationException: Can't overwrite existing member #73 with identical identifier (Email = [email protected]))
/...../framework/security/Member.php:824

Member->onBeforeWrite()
DataObject.php:1145
DataObject->write()
Member.php:1554
Member->registerFailedLogin()
UsernameOrEmailAuthenticator.php:50
UsernameOrEmailAuthenticator::authenticate(Array,UsernameOrEmailLoginForm)
UsernameOrEmailLoginForm.php:57
UsernameOrEmailLoginForm->performLogin(Array)
MemberLoginForm.php:160
MemberLoginForm->dologin(Array,UsernameOrEmailLoginForm,SS_HTTPRequest)
Form.php:381
Form->httpSubmission(SS_HTTPRequest)
RequestHandler.php:288
RequestHandler->handleAction(SS_HTTPRequest,httpSubmission)
RequestHandler.php:200
RequestHandler->handleRequest(SS_HTTPRequest,DataModel)
RequestHandler.php:222
RequestHandler->handleRequest(SS_HTTPRequest,DataModel)
Controller.php:153
Controller->handleRequest(SS_HTTPRequest,DataModel)
Director.php:370
Director::handleRequest(SS_HTTPRequest,Session,DataModel)
Director.php:153
Director::direct(/Security/LoginForm,DataModel)
main.php:177
Details

$_SERVER['HTTP_ACCEPT'] 
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
$_SERVER['HTTP_ACCEPT_CHARSET'] 
$_SERVER['HTTP_ACCEPT_ENCODING']    
gzip, deflate
$_SERVER['HTTP_ACCEPT_LANGUAGE']    
en-us
$_SERVER['HTTP_REFERRER']   
$_SERVER['HTTP_USER_AGENT'] 
Mozilla/5.0 (iPhone; CPU iPhone OS 8_1_2 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12B440 Safari/600.1.4
$_SERVER['HTTPS']   
$_SERVER['REMOTE_ADDR'] 
*************ip removed************
@mlewis-everley
Copy link
Member

Wow, this is an old issue. For anyone who sees this, I have pushed a fairly large update that adds slightly tighter integration to the default Authenticator.

This issue is actually caused (by the look of it) by the SilverStripe Authenticator not handling the thrown exception further up the stack than this module. I have added some exception handling further which now flags a form error, but it might be worth logging this as an issue with the SilverStripe framework.

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

2 participants