$GLOBALS['conf']['cache'] = FALSE; // Prevent caching on this page

global $user;

if(strstr($_REQUEST['q'],'user/login')) {
$output = '

Login Problems?

';
$output .= 'Unlock';
$output .= '

It looks like you\'re having trouble trying to log in. We\'re sorry about this.
Here\'s some help:

';
$output .= '

    ';
    $output .= '
  • Use the back button to return to the page you want to access, then refresh the page (usually by tapping the F5 key). You should now see yourself logged in.
  • ';
    $output .= '

  • If that doesn\'t work, try our detailed login help page.
  • ';
    $output .= '

  • Still having problems? Let us know.
  • ';
    $output .= '

';
print $output;
}
elseif (tth_util_is_node_published($_REQUEST['q']) == 0) { /* Node is unpublished */
print '

Page Offline

';
print '

This page is currently unavailable. We might have taken it offline to make a few changes or the information on the page is no longer relevant.

';
if (in_array('Member', $user->roles)) { print '

If you can see this message, you are a Premium Member and are logged in. There is not an error with your account.

'; }
}
else { /* Published node */
print '

Content Restricted. Are you a Premium Member?

';
print 'Unlock';
print '

This content is exclusively for Premium Members. There are tons of great exclusives and benefits for Premium Members, including access to the content you\'re trying to view now.

';
print'

';

if (!in_array('authenticated user', $user->roles)) { /* Not logged in */
print '

';
print '

If you\'re already a Premium Member, login below:

';
print drupal_get_form('user_login_block');
print '

';
}
print '

If you are already a Premium Member, please log out and then log back in. If you still receive this message in error, please let us know.

';
}

?>

Last Updated: Mar 13, 2016

Comments