Jump to:
| Project: | Shared Sign-On |
| Version: | 5.x-1.1 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
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
#1
Ok. 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.
#2
#3
Yes the new version works for me
#4
Automatically closed -- issue fixed for two weeks with no activity.