OCS problem with user emails that must be unique

Hi

OCS 2.3.6: When a user registers they need to enter an email and that email needs to be unique among the users. The email being required is fine but I have for an upcoming conference about a two dozen users that share an email address.

I can see in the users table the email field is not null, unique.
In classes/registration/form/UserRegistrationForm.inc.php I see the check:
$this->addCheck(new FormValidatorCustom($this,
‘email’, ‘required’, ‘user.account.form.emailExists’, array(DAORegistry::getDAO(‘UserDAO’),
‘userExistsByEmail’), array(), true));

If I change the users table to require email remain as not null but remove uniquness and comment out the addCheck() will other things break?

I am not planning to tie in with OJS or harvesting services.

Mike

Hi @MikeL,

Having two dozen users share an email account seems pretty unusual; can you describe that in more detail?

Regards,
Alec Smecher
Public Knowledge Project Team

About two dozen pairs of users share email i.e. husband and wife that will both register for the conference. e.g.
bobandmary@aol.com ← pair that share an email
denis_rachel@hotmail.com ← another pair that share an email
texascavers@aol.com ← family of 4 that share an email
(There might be lots more, fake examples above are like what we had from attendees 4 years ago. )

Sorry about the confusion.
Also when I i’m testing and I want a to create some users with different roles like director, reviewer and author but they have have my email address. I have three email addresses I can use but turning off uniqueness would be handy.

Just wanted to know if disabling that in that one line of code would break anything else.

Mike

Hi @MikeL,

I think the only place that you’ll run into trouble is the password reset process. For that you need to start by supplying your email address, and if there’s no longer a 1:1 correspondence between emails and user accounts, then OCS won’t be sure which password you’re trying to reset.

Regards,
Alec Smecher
Public Knowledge Project Team

Thanks Alec
I would not have realised that and its a good reason that I can explain to users why they need a unique email for each user. I wont spend time trying to change that feature.
Thanks for the info.
Mike