function login_destination_form_user_form_submit in Login Destination 8
Same name and namespace in other branches
- 8.2 login_destination.module \login_destination_form_user_form_submit()
Submit handler for form 'user_form'.
Performs a redirect if all of the following is true:
- There is a login destination rule configured for the 'One-time login link' trigger.
- The user used an one-time login url.
- The user just submitted the user profile form.
1 string reference to 'login_destination_form_user_form_submit'
- login_destination_form_user_form_alter in ./
login_destination.module - Implements hook_form_FORM_ID_alter() for user_form().
File
- ./
login_destination.module, line 93 - Control where users are directed to, once they login, register or logout.
Code
function login_destination_form_user_form_submit(array &$form, FormStateInterface $form_state) {
$account = $form_state
->getFormObject()
->getEntity();
login_destination_perform_redirect('one-time-login', $account);
}