You are here

function janrain_capture_render_logout_link in Janrain Registration 7

Same name and namespace in other branches
  1. 7.4 janrain_capture.module \janrain_capture_render_logout_link()
  2. 7.2 janrain_capture.module \janrain_capture_render_logout_link()
  3. 7.3 janrain_capture.module \janrain_capture_render_logout_link()

Generates a 'Logout' link for Janrain Capture.

1 call to janrain_capture_render_logout_link()
janrain_capture_block_content in ./janrain_capture.module
Provides the content for the Janrain Capture block, and is also used to replace the user login block content if the "enforce" setting is on.

File

./janrain_capture.module, line 379
This module implements authentication endpoints for Janrain Capture.

Code

function janrain_capture_render_logout_link() {
  $janrain_capture_optional = variable_get('janrain_capture_optional', array());
  if ($janrain_capture_optional['capture_sso_address']) {
    $link = '<a href="javascript:CAPTURE.logout()">' . t('Log out') . '</a>';
  }
  else {
    $link = l(t('Log out'), 'user/logout');
  }
  return $link;
}