Commit 7feb58e5 authored by Dries's avatar Dries

- Patch #394488 by Dave Reid: corrected some database conversions.

parent b59c6629
......@@ -89,7 +89,7 @@ function openid_user_add_validate($form, &$form_state) {
* Menu callback; Delete the specified OpenID identity from the system.
*/
function openid_user_delete_form($form_state, $account, $aid = 0) {
$authname = db_query('SELECT authname FROM {authmap} WHERE uid = :uid AND aid = :aid', array(
$authname = db_query("SELECT authname FROM {authmap} WHERE uid = :uid AND aid = :aid AND module = 'openid'", array(
':uid' => $account->uid,
':aid' => $aid,
))
......@@ -99,12 +99,12 @@ function openid_user_delete_form($form_state, $account, $aid = 0) {
function openid_user_delete_form_submit(&$form_state, $form_values) {
$query = db_delete('authmap')
->condition('uid', $form_state['#parameters'][2]->uid)
->condition('aid', $form_state['#parameters'][3])
->condition('uid', $form_state['#args'][0]->uid)
->condition('aid', $form_state['#args'][1])
->condition('module', 'openid')
->execute();
if ($query) {
drupal_set_message(t('OpenID deleted.'));
}
$form_state['#redirect'] = 'user/'. $form_state['#args'][0]->uid .'/openid';
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment