Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Email Login Plugin for OJS 3.3+

OJS Version License

Allows users to login with their email address in addition to their username.

The Problem

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.

The Solution

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.

Features

  • ✅ 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)

Requirements

  • OJS 3.3.0 - 3.3.0.22
  • PHP 7.3 or higher

Installation

Method 1: Upload via Admin Panel

  1. Download the latest release (.tar.gz file)
  2. Go to Settings → Website → Plugins
  3. Click Upload A New Plugin
  4. Select the downloaded file
  5. Enable the plugin under Generic Plugins

Method 2: Manual Installation

  1. Download and extract the plugin
  2. Copy to plugins/generic/emailLogin/
  3. Go to Settings → Website → Plugins
  4. Enable "Email Login" under Generic Plugins

How It Works

  1. User enters their email address in the username field
  2. Plugin detects email format and looks up the associated username
  3. Request is modified to use the actual username
  4. OJS processes login normally
User enters: user@example.com
Plugin finds: johndoe (username)
OJS receives: johndoe
Login succeeds!

Security

  • 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

Localization

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]/.

Troubleshooting

Plugin not appearing in list

  • Ensure the folder is named exactly emailLogin
  • Check that index.php exists in the plugin folder
  • Verify OJS version compatibility

Email login not working

  • Verify the email address exists in the database
  • Check that the user account is not disabled
  • Clear OJS cache: rm -rf cache/*

Form label not updating

  • Clear browser cache
  • Check for JavaScript errors in browser console

Changelog

1.1.0.0 (2026-01-30)

  • Production release
  • Added form label modification
  • Enhanced security with input sanitization
  • Case-insensitive email matching
  • Disabled account exclusion
  • Comprehensive error handling

1.0.0.0 (2026-01-30)

  • Initial development version

License

This plugin is licensed under the GNU General Public License v3.0.

Author

Kerim Sarıgül

Contributing

Contributions are welcome! Please feel free to submit issues and pull requests.

Support

If you encounter any issues, please open an issue on GitHub.

About

OJS 3.3+ plugin that allows users to login with their email address in addition to their username

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages