This query in singlesignon.module:
db_query("UPDATE {sessions} AS sess_slave LEFT JOIN {sessions} AS sess_master ON (sess_master.sid = '%s' AND sess_slave.sid = '%s') SET sess_slave.uid = sess_master.uid WHERE sess_slave.sid = '%s'", session_id(), $_GET['slave_session'], $_GET['slave_session']);
Fails in Postgres. In postgres < 8.2 you can't alias a table in an update, and in all versions you can't do a join. I agree it's nice to be able to do it the mysql way, but alas postgres is stuck in its ways sometimes. This works for me:
$result = db_query("SELECT uid FROM {sessions} WHERE sid = '%s'", session_id());
if ($master_uid = db_result($result)) {
db_query("UPDATE {sessions} SET uid = %d WHERE sid = '%s'", $master_uid, $_GET['slave_session']);
}
Comments
Comment #1
wayland76 commentedOk. I was planning to put the session handling code in a separate file anyway. Try it with the latest version that I've just released.
Comment #2
wayland76 commentedComment #3
neilnz commentedYes the new version works for me
Comment #4
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.