Allows users to login with their email address in addition to their username.
In OJS, users must login with their username. However, many users naturally try to login with their email address - the same way they login to most other websites. When this fails, they assume they've forgotten their password and request a reset, creating unnecessary friction and support requests.
This plugin intercepts the login process and automatically converts email addresses to usernames, allowing users to login with either credential. No core file modifications required.
- ✅ Login with email address
- ✅ Login with username (unchanged behavior)
- ✅ Automatic form label update ("Username or Email")
- ✅ Case-insensitive email matching
- ✅ Disabled accounts are excluded
- ✅ SQL injection protection (prepared statements)
- ✅ Input validation and sanitization
- ✅ No core file modifications
- ✅ Bilingual support (English/Turkish)
- OJS 3.3.0 - 3.3.0.22
- PHP 7.3 or higher
- Download the latest release (.tar.gz file)
- Go to Settings → Website → Plugins
- Click Upload A New Plugin
- Select the downloaded file
- Enable the plugin under Generic Plugins
- Download and extract the plugin
- Copy to
plugins/generic/emailLogin/ - Go to Settings → Website → Plugins
- Enable "Email Login" under Generic Plugins
- User enters their email address in the username field
- Plugin detects email format and looks up the associated username
- Request is modified to use the actual username
- OJS processes login normally
User enters: user@example.com
Plugin finds: johndoe (username)
OJS receives: johndoe
Login succeeds!
- SQL Injection Protection: All database queries use prepared statements
- Input Validation: Email addresses are validated and sanitized before processing
- No Sensitive Data Exposure: Error messages don't reveal whether an email exists
- Disabled Account Check: Disabled users cannot login via email
The plugin includes translations for:
- English (en_US)
- Turkish (tr_TR)
To add a new language, create a locale.po file in locale/[language_code]/.
- Ensure the folder is named exactly
emailLogin - Check that
index.phpexists in the plugin folder - Verify OJS version compatibility
- Verify the email address exists in the database
- Check that the user account is not disabled
- Clear OJS cache:
rm -rf cache/*
- Clear browser cache
- Check for JavaScript errors in browser console
- Production release
- Added form label modification
- Enhanced security with input sanitization
- Case-insensitive email matching
- Disabled account exclusion
- Comprehensive error handling
- Initial development version
This plugin is licensed under the GNU General Public License v3.0.
Kerim Sarıgül
Contributions are welcome! Please feel free to submit issues and pull requests.
If you encounter any issues, please open an issue on GitHub.