You are here

function oauth2_server_test_oauth2_server_user_claims_alter in OAuth2 Server 7

Same name and namespace in other branches
  1. 8 tests/modules/oauth2_server_test/oauth2_server_test.module \oauth2_server_test_oauth2_server_user_claims_alter()
  2. 2.0.x tests/modules/oauth2_server_test/oauth2_server_test.module \oauth2_server_test_oauth2_server_user_claims_alter()

Implements hook_oauth2_server_user_claims_alter().

File

tests/oauth2_server_test.module, line 30
Support module for OAuth2 Server testing.

Code

function oauth2_server_test_oauth2_server_user_claims_alter(&$claims, $account, $requested_scopes) {
  if (in_array('phone', $requested_scopes)) {
    $claims['phone_number'] = '123456';
    $claims['phone_number_verified'] = FALSE;
  }
}