public function miniorange_oauth_clientController::miniorange_oauth_client_update_email_username_attribute in Drupal OAuth & OpenID Connect Login - OAuth2 Client SSO Login 8
1 call to miniorange_oauth_clientController::miniorange_oauth_client_update_email_username_attribute()
File
- src/
Controller/ miniorange_oauth_clientController.php, line 527 - Contains \Drupal\miniorange_oauth_client\Controller\DefaultController.
Class
Namespace
Drupal\miniorange_oauth_client\ControllerCode
public function miniorange_oauth_client_update_email_username_attribute($data) {
$options = '';
$selected_flag = 0;
foreach ($data as $key => $value) {
if ($selected_flag == 0 && ($key == 'email' || $key == 'email.0')) {
$options = $options . '<option value="email" selected> email </option>';
$selected_flag = 1;
}
elseif ($selected_flag == 0 && ($key == 'emails' || $key == 'emails.0')) {
$options = $options . '<option value="emails" selected> emails </option>';
$selected_flag = 1;
}
else {
$options = $options . '<option value="' . $key . '"> ' . $key . ' </option>';
}
}
$html_string = '<p style="display: inline-block;"> <b> Email Attribute </b></p> <select id="mo_oauth_email_attribute" style="height: 32px;">' . $options . '</select>
<input style="display: none;" id="miniorange_oauth_client_other_field_for_email" placeholder="Enter Email Attribute">';
echo $html_string . '';
return new Response();
}