You are here

function _auth0_form_replace_with_lock in Auth0 Single Sign On 7.2

Replace a form with the lock widget.

1 call to _auth0_form_replace_with_lock()
auth0_form_alter in ./auth0.module
Implements hook_form_alter().

File

./auth0.module, line 977

Code

function _auth0_form_replace_with_lock(&$form, $mode = 'signin') {

  // Remove the old form elements.
  foreach (element_children($form) as $child) {
    unset($form[$child]);
  }

  // Add an Auth0 Lock widget.
  $form['auth0'] = array(
    '#type' => 'markup',
    '#markup' => theme('auth0_lock', array(
      'mode' => $mode,
    )),
  );
}