Download the PHP package topshelfcraft/legacy-login without Composer
On this page you can find all versions of the php package topshelfcraft/legacy-login. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download topshelfcraft/legacy-login
More information about topshelfcraft/legacy-login
Files in topshelfcraft/legacy-login
Package legacy-login
Short Description Seamless legacy user authentication for Craft CMS
License proprietary
Informations about the package legacy-login
Legacy Login
Seamless legacy user authentication for Craft CMS
A Top Shelf Craft creation
Michael Rog, Proprietor
TL;DR.
The Legacy Login plugin provides a way to authenticate users from a legacy system into your Craft CMS site.
The legacy-login/login
custom action stands in for Craft's native login
form action. If a submitted loginName
/password
fails Craft's native authentication, the plugin checks the legacy system(s) and tries to authenticate a user from there. If a matching legacy user is found and authenticated, the plugin creates or updates the User in Craft and logs into the newly created/matched account.
What legacy systems are supported?
Legacy Login provides drivers for authenticating legacy users from:
- Craft CMS 4.x
- Craft CMS 3.x
- Craft CMS 2.x
- ExpressionEngine 2.x
- WordPress
Two legacy drivers are not yet ported to the Craft 4 version of Legacy Login:
- BigCommerce (Self-hosted)
- Wellspring
Installation
-
From your project directory, use Composer to require the plugin package:
Note: Legacy Login is also available for installation via the Craft CMS Plugin Store.
-
In the Control Panel, go to Settings → Plugins and click the “Install” button for Legacy Login.
- Finally, add the Legacy Login form to your login template. The template follows the same design as Craft's native login form, except the form action should point to the LegacyLoginController rather than Craft's native UsersController:
Configuration
To customize the plugin's behavior, add a legacy-login.php
file to your Craft config directory:
The file should return an array, following the same format as Craft's own Config files.
(As with all Config files in Craft, the Legacy Login config supports Multi-Environment Configs and other techniques for Environmental Configuration.)
handlers
The config file provides a list of Handler configurations.
Each Handler configuration must define a name
and type
.
Available options include:
name
What the handler should be called in Legacy Login records.
type
'Craft4'
, 'Craft3'
, 'Craft2'
, 'EE2'
, 'BigCommerce'
, 'Wellspring'
, 'WordPress'
, or a custom (fully qualified) class name.
createUser
Whether to create a new Craft user if a matching one doesn't already exist in the system.
(If false
, only existing Users can be logged in via legacy handlers. Authentication for legacy users that don't match a User in the current system will fail, whether the loginName/password are correct or not.)
Default: true
updateUser
Whether to update the profile (including password) of a matched Craft user from the legacy data.
Default: true
requirePasswordReset
Whether to set the Require Password Reset flag on a created/matched Craft user, i.e. requiring them to change their password upon their next login.
Default: false
maxLogins
How many times a User may be authenticated using this handler.
Default: 1
table
For database-type handlers: The name of the table from which legacy user data should be queried.
db
For database-type handlers: An array of database config options, following the same template as Craft's own Database Connection Settings.
What are the system requirements?
Craft 4.0+ and PHP 8.0+
I found a bug.
I'm not surprised... Legacy Login is still in beta. Please open a GitHub Issue or submit a PR.
Contributors:
- Plugin development: Michael Rog / @michaelrog
- WordPress and Wellspring drivers for Craft 2: Aaron Waldon / @aaronwaldon
- Initial port for Craft 3: TJ Draper / @buzzingpixel
- Skeleton key icon: Becca, via The Noun Project