X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=planetlab%2Fincludes%2Fplc_session.php;fp=planetlab%2Fincludes%2Fplc_session.php;h=ebdc0501d3fd733157b018bbd9b336697ef89ead;hb=f78d6b6e081ccb8a68e63e885db93873e60e0a1c;hp=7850d86f869f6c8428d2ca81059f9a3117438768;hpb=d9fa11507938cca59756e611b1d896b129295e61;p=plewww.git diff --git a/planetlab/includes/plc_session.php b/planetlab/includes/plc_session.php index 7850d86..ebdc050 100644 --- a/planetlab/includes/plc_session.php +++ b/planetlab/includes/plc_session.php @@ -79,7 +79,7 @@ class PLCSession $_SESSION['plc'] = array('auth' => $api->auth, 'person' => $person, 'expires' => $expires); - } + } } function BecomePerson($person_id) @@ -87,12 +87,12 @@ class PLCSession list($person) = $this->api->GetPersons(array($person_id)); if ($person) { - //Get this users session if one exists, create + //Get this users session if one exists, create //one otherwise list($session) = $this->api->GetSessions(array('person_id' => $person['person_id'])); if (!$session) { - $session = $this->api->AddSession($person['person_id']); + $session = $this->api->AddSession($person['person_id']); } else { @@ -112,12 +112,12 @@ class PLCSession $_SESSION['plc']['person'] = $this->person; $_SESSION['plc']['alt_person'] = $this->alt_person; $_SESSION['plc']['alt_auth'] = $this->alt_auth; - - } + + } } function BecomeSelf() - { + { if($this->alt_auth && $this->alt_person ) { $this->person = $this->alt_person; @@ -129,9 +129,9 @@ class PLCSession $_SESSION['plc']['person'] = $_SESSION['plc']['alt_person']; unset($_SESSION['plc']['alt_auth']); unset($_SESSION['plc']['alt_person']); - } + } } - + function logout() {