This is a standard plugin to make user login / registration available on your website.
This is a standard plugin to make user login / registration available on your website.
Install and activate as any other plugin. Login, registration and logout URLs will immediately be available in the form exmaple.com/login exmple.com/registration example.com/logout.
You can use standard ImpressPages user functions to get the status about currently logged in user.
Generate URLs:
<?php
$loginUrl = ipRouteUrl('User_login');
$registrationUrl = ipRouteUrl('User_registration');
$profileUrl = ipRouteUrl('User_profile');
$logoutUrl = ipRouteUrl('User_logout');
?>
If you want user to come back to specific page after successful login / registration, save the URL to the session as follow before redirecting to the login URL:
<?php
$_SESSION['User_redirectAfterLogin'] = 'http://...';
?>
You can do almost anything by catching events and filters of this plugin. E.g. you can implement User_registrationForm filter and add an additional field to the registration form. Then catch User_register event and store additional posted data in the way you like.
Instead of using widgets, you can print login / registration and other forms using slots:
<?php echo ipSlot('User_status); ?> //Login or profile URL depending on the current status
<?php echo ipSlot('User_login'); ?>
<?php echo ipSlot('User_passwordReset'); ?>
<?php echo ipSlot('User_profile'); ?>
<?php echo ipSlot('User_registration'); ?>
<?php echo ipSlot('User_updatePassword'); ?>
Events
Plugin throws following events:
Filters
* There are more very specific filters. If you are building something very unique, you can look for them in the source code
* Form filters with number 2 at the end and without it gives you the same form. Just first one gives it while no submit button is added yet. So that you could add some fields before submit button. Filters with 2 at the end gives you the complete form with submit button already been added.