Beispiel #1
0
 /**
  * Deletes all data of the current session.
  *
  * This method does not change the session ID, but deletes all data associated with the current
  * session.
  */
 public function deleteAll()
 {
     // Starts session if not started already
     if (!$this->sessionStarted) {
         $this->start();
     }
     $data = $this->storage->fetch($this->sid);
     if ($data !== null) {
         foreach ($data as $key => $value) {
             if ($key !== 'GID') {
                 unset($data[$key]);
             }
         }
         $this->storage->update($this->sid, $data, false);
     }
 }
 public function update($gid, $data)
 {
     assert(isset($data['password']));
     $hash = $this->hashFunction->calculatePasswordHash($data['password'], $this->costFactor, $this->hmacKey);
     $this->storage->update($gid, $hash);
 }