You are here

function auth0_block_view in Auth0 Single Sign On 7.2

Implements hook_block_view().

Provide output for the Auth0 Lock block.

File

./auth0.module, line 1153

Code

function auth0_block_view($delta = '') {
  global $user;
  $block = array();
  switch ($delta) {
    case 'auth0_lock':
      if (!$user->uid) {
        $block['subject'] = '';
        $block['content'] = array(
          '#type' => 'markup',
          '#markup' => theme('auth0_lock', array(
            'mode' => 'signin',
          )),
        );
      }
      break;
  }
  return $block;
}