diff options
author | Dries Buytaert <dries@buytaert.net> | 2008-09-21 15:08:39 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2008-09-21 15:08:39 +0000 |
commit | 19329548f9084653ee4dbdc1dd289919d21f5aeb (patch) | |
tree | eaee658666f1894bc62a01f01119fc5f5cd54121 | |
parent | 17846beda667a34682ed9c81c005d2a082bb773f (diff) | |
download | brdo-19329548f9084653ee4dbdc1dd289919d21f5aeb.tar.gz brdo-19329548f9084653ee4dbdc1dd289919d21f5aeb.tar.bz2 |
- Patch #305236 by crell: made OpenID work again. We need tests for this.
-rw-r--r-- | modules/user/user.module | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/modules/user/user.module b/modules/user/user.module index 0dc6285a1..975a1ad77 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -1192,15 +1192,18 @@ function user_set_authmaps($account, $authmaps) { foreach ($authmaps as $key => $value) { $module = explode('_', $key, 2); if ($value) { - db_insert('authmap')->key(array( + db_merge('authmap') + ->key(array( 'uid' => $account->uid, 'module' => $module[1], - ))->fields(array( + )) + ->fields(array( 'authname' => $value, - ))->execute(); + )) + ->execute(); } else { - db_query("DELETE FROM {authmap} WHERE uid = %d AND module = '%s'", $account->uid, $module[1]); + db_delete('authmap')->condition('uid', $account->uid)->condition('module', $module[1])->execute(); } } } |