function hybridauth_user_delete_form in HybridAuth Social Login 7
Menu callback; Delete the specified Engage identity from the system.
1 string reference to 'hybridauth_user_delete_form'
- hybridauth_menu in ./
hybridauth.module - Implements hook_menu().
File
- ./
hybridauth.pages.inc, line 702
Code
function hybridauth_user_delete_form($form, $form_state, $account, $aid = NULL) {
if (!$aid) {
drupal_not_found();
drupal_exit();
}
$provider_id = db_query("SELECT ha.provider_id FROM {authmap} am INNER JOIN {hybridauth_account} ha ON am.aid = ha.aid WHERE am.uid=:uid AND am.aid=:aid AND module=:module", array(
':uid' => $account->uid,
':aid' => $aid,
':module' => 'hybridauth',
))
->fetchField();
if (!$provider_id) {
drupal_not_found();
drupal_exit();
}
$provider_name = hybridauth_get_provider_name($provider_id);
$username = check_plain(format_username($account));
return confirm_form(array(), t('Are you sure you want to remove this linked %provider account for %user?', array(
'%provider' => $provider_name,
'%user' => $username,
)), 'user/' . $account->uid . '/hybridauth', '');
}