Email as Username

OJS development discussion, enhancement requests, third-party patches and plug-ins.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
The Public Knowledge Project Support Forum is moving to

This forum will be maintained permanently as an archived historical resource, but all new questions should be added to the new forum. Questions will no longer be monitored on this old forum after March 30, 2015.
Posts: 45
Joined: Thu Apr 05, 2007 10:01 am

Email as Username

Postby shimrah » Thu Jan 24, 2008 1:49 pm

Do you plan to add the option to use email as user name? If so, and the "use email as username" checkbox is checked in OJS setup, then it should hide the email field on the registration form and check the user name field for email address compliance + send a confirmation email to the entered address to confirm password.

We've found that this works (manually) if we replace the username in the database with an email, which leaves us with two questions:

1. OJS checks the username, on registration, for special characters (disallowing @). Is this the only place it's checked?

2. Once we replace the username, we have to reset the password. I assume that the password-encryption algorhithm, then, replies on the username. Is that algorithm posted somewhere in the forum?

3. We changed the database field for username to 90 characters, to fit all email addresses. Aside from this, is there anywhere else that this value might be truncated that you can think of offhand?

Thanks for your help,


Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm

Re: Email as Username

Postby asmecher » Tue Jan 29, 2008 11:37 am

Hi Shimrah,

This is the first request we've had for this feature, but if we get a lot of requests for it we might merge it into the core. In the meantime, I'd suggest maintaining a modification like the one you're working on.

Usernames are validated in a few places:
  • classes/install/form/ (just for the installation user)
  • classes/manager/form/
  • classes/sectionEditor/form/
  • classes/user/form/
As for passwords, these are generated by hashing a combination of the username and password. See for a note on how these are generated.

Alec Smecher
Public Knowledge Project Team

Return to “OJS Development”

Who is online

Users browsing this forum: Google [Bot] and 2 guests