How can I implement user timezone & user's last login in this format? Im trying to create a block and I'm  having trouble. I'm trying to get the user's last login &amp; the user's timezone. How can I implement those functions in these hooks. All I know is the fact that I need to use the functions of hook_info &amp; hook_view.

function hook_block_info() {

  $blocks[‘syndicate’] = array(
    ‘info’ =&gt; t(‘Syndicate’),
    ‘cache’ =&gt; DRUPAL_NO_CACHE,
  );

  $blocks[‘recent’] = array(
    ‘info’ =&gt; t(‘Recent content’),
  );

  return $blocks;
}

function hook_block_view_alter(&amp;$data, $block) {

  if (is_array($data[‘content’]) &amp;&amp; asset($data[‘content’][‘#contextual_links’])) {
    unset($data[‘content’][‘#contextual_links’]);
  }

  if (is_array($data[‘content’]) &amp;&amp; $block-&gt;module == ‘some module’) {
    $data[‘contentr’][‘#theme_wrappers’][] = ‘mymodule_special_block’;
  }
}
You can use the global $user object to get user details, or load user details from a uid like this: $user = user_load($uid); From the $user-&gt;login property you can get last login timestamp.

Thanks