ckanext-emailasusername
Many users quickly forget their CKAN username or assume they should use their email to login. This CKAN extension allows users to login or reset their password with either their email address or their username. It doesn’t do away with the username but just offers the option to use email instead.
Features
- Login with email address or username
- Password reset with email address or username
- Prevents duplicate email registrations
- Optional auto-generation of username from email
- Optional auto-population of username from full name
- Optional double-entry email confirmation on registration
- User search by email for sysadmins
- Available on PyPI
Requirements
This extension is tested with CKAN 2.9 for Python 3 only.
Installation
To install ckanext-emailasusername:
Activate your CKAN virtual environment:
. /usr/lib/ckan/default/bin/activate
Install the ckanext-emailasusername Python package:
pip install ckanext-emailasusername
Add emailasusername to the ckan.plugins setting in your CKAN config file.
Configure CKAN to use the authenticator provided in this plugin. Add ckanext.emailasusername.authenticator:EmailAsUsernameAuthenticator to the [authenticators] plugins configuration in CKAN’s who.ini file:
[authenticators]
plugins =
auth_tkt
ckanext.emailasusername.authenticator:EmailAsUsernameAuthenticator
Restart CKAN.
Configuration
# Allow searching users by email (sysadmins only for full search)
ckanext.emailasusername.search_by_username_and_email = True
# Auto-generate username from email (WARNING: reveals part of email)
ckanext.emailasusername.auto_generate_username_from_email = False
# Auto-populate username field from full name in registration form
ckanext.emailasusername.auto_generate_username_from_fullname = False
# Require double-entry of email on registration form
ckanext.emailasusername.require_user_email_input_confirmation = True
With Thanks
This extension has been built by Fjelltopp with funding from UNAIDS as part of the AIDS Data Repository project: https://adr.unaids.org
License
AGPL-3.0 license