You are here

function janrain_capture_profile_link in Janrain Registration 7.4

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

Returns a render array for the 'Edit profile' link for Janrain Capture.

File

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

Code

function janrain_capture_profile_link() {
  global $base_url;
  $ver = variable_get('janrain_capture_ver', JANRAIN_CAPTURE_VERSION_DEFAULT);
  if ($ver == JANRAIN_CAPTURE_VERSION_LEGACY) {
    $link = array(
      '#type' => 'link',
      '#title' => t('View / Edit Profile'),
      '#href' => 'janrain_capture/profile',
      '#options' => array(
        'absolute' => TRUE,
      ),
      '#attributes' => array(
        'class' => array(
          'janrain_capture_anchor',
        ),
      ),
    );
  }
  else {
    $link = array(
      '#type' => 'link',
      '#title' => t('View / Edit Profile'),
      '#href' => 'user',
      '#options' => array(
        'absolute' => TRUE,
      ),
      '#attributes' => array(
        'class' => array(
          'janrain_capture_anchor',
        ),
      ),
    );
  }
  return $link;
}