/[drupal]/contributions/modules/singlesignon/sessions_extra.inc
ViewVC logotype

Diff of /contributions/modules/singlesignon/sessions_extra.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1, Mon May 5 12:44:00 2008 UTC revision 1.2, Mon May 5 13:38:20 2008 UTC
# Line 19  Line 19 
19   * (except of course the current one, which is needed for Drupal's regular   * (except of course the current one, which is needed for Drupal's regular
20   * logout process which takes place after this).   * logout process which takes place after this).
21   */   */
22  functions _singlesignon_session_logout($uid) {  function _singlesignon_session_logout($uid) {
23    db_query("DELETE FROM {sessions} WHERE uid = %d AND sid <> '%s'", $uid, session_id());    db_query("DELETE FROM {sessions} WHERE uid = %d AND sid <> '%s'", $uid, session_id());
24  }  }
25    
# Line 28  functions _singlesignon_session_logout($ Line 28  functions _singlesignon_session_logout($
28   * update the slave session's user ID to be the user ID they have on the   * update the slave session's user ID to be the user ID they have on the
29   * master server   * master server
30   */   */
31  functions _singlesignon_session_update_user() {  function _singlesignon_session_update_user() {
32  // The line below doesn't work in Postgres: http://drupal.org/node/254752 -- the guy in that bug recommended the change  // The line below doesn't work in Postgres: http://drupal.org/node/254752 -- the guy in that bug recommended the change
33  //  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']);  //  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']);
34    $result = db_query("SELECT uid FROM {sessions} WHERE sid = '%s'", session_id());    $result = db_query("SELECT uid FROM {sessions} WHERE sid = '%s'", session_id());

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.2