function bakery_form_user_pass_alter in Bakery Single Sign-On System 8.2
Implements hook_form_FORM_ID_alter() for 'user_pass'.
File
- ./
bakery.module, line 228 - For implementing different hooks for bakery SSO functionality.
Code
function bakery_form_user_pass_alter(&$form, FormStateInterface $form_state) {
/** @var \Drupal\bakery\BakeryService $bakery */
$bakery = \Drupal::service('bakery.bakery_service');
// Child sites need to make sure the local account exists, if the master
// account exists.
if ($bakery
->isChild()) {
array_unshift($form['#validate'], '_bakery_pass_validate');
}
}