summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2003-02-09 18:06:31 +0000
committerDries Buytaert <dries@buytaert.net>2003-02-09 18:06:31 +0000
commit3d3a60740a63e8c803d0905b2727bb202e6de370 (patch)
tree59087109994ea65dfa9ca1592bc4e52da3ce62bd
parente5aae050a729c33e1304748ac30d8f995ce7cb66 (diff)
downloadbrdo-3d3a60740a63e8c803d0905b2727bb202e6de370.tar.gz
brdo-3d3a60740a63e8c803d0905b2727bb202e6de370.tar.bz2
- Changed '%s' into '%d' such that an empty $user->uid is converted to 0. Requi
red for Drupal to work on new versions of PostgreSQL. Patch by James.
-rw-r--r--modules/user.module2
-rw-r--r--modules/user/user.module2
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/user.module b/modules/user.module
index 1e7536a8a..0e81f09f8 100644
--- a/modules/user.module
+++ b/modules/user.module
@@ -473,7 +473,7 @@ function user_set_authmaps($account, $authmaps) {
if ($value) {
$result = db_query("SELECT COUNT(*) from authmap WHERE uid = '%d' && module = '%s'", $account->uid, $module["1"]);
if (db_result($result) == 0) {
- $result = db_query("INSERT INTO authmap (authname, uid, module) VALUES ('%s', '%s', '%s')", $value, $account->uid, $module[1]);
+ $result = db_query("INSERT INTO authmap (authname, uid, module) VALUES ('%s', '%d', '%s')", $value, $account->uid, $module[1]);
}
else {
$result = db_query("UPDATE authmap SET authname = '%s' WHERE uid = '%d' AND module = '%s'", $value, $account->uid, $module["1"]);
diff --git a/modules/user/user.module b/modules/user/user.module
index 1e7536a8a..0e81f09f8 100644
--- a/modules/user/user.module
+++ b/modules/user/user.module
@@ -473,7 +473,7 @@ function user_set_authmaps($account, $authmaps) {
if ($value) {
$result = db_query("SELECT COUNT(*) from authmap WHERE uid = '%d' && module = '%s'", $account->uid, $module["1"]);
if (db_result($result) == 0) {
- $result = db_query("INSERT INTO authmap (authname, uid, module) VALUES ('%s', '%s', '%s')", $value, $account->uid, $module[1]);
+ $result = db_query("INSERT INTO authmap (authname, uid, module) VALUES ('%s', '%d', '%s')", $value, $account->uid, $module[1]);
}
else {
$result = db_query("UPDATE authmap SET authname = '%s' WHERE uid = '%d' AND module = '%s'", $value, $account->uid, $module["1"]);