You are here

function oauth2_login_url_outbound_alter in OAuth2 Login 7.2

Same name and namespace in other branches
  1. 7 oauth2_login.module \oauth2_login_url_outbound_alter()

Implements hook_url_outbound_alter().

File

./oauth2_login.module, line 80
Provides OAuth2 Login functionality.

Code

function oauth2_login_url_outbound_alter(&$path, &$options, $original_path) {

  // Keep track of the current page so that we can return back after login.
  switch ($path) {
    case 'user/login':
      $options['query']['destination'] = $_GET['q'];
      break;
    case 'user/oauth2_login':
      $options['query']['page'] = request_uri();
      break;
  }
}