/** * Save any changes to the $gpAdmin array * @param string $file Session file path * @param string $checksum_read The original checksum of the $gpAdmin array * */ function close($file, $checksum_read) { global $gpAdmin; gpsession::Cron(); unset($gpAdmin['checksum']); $checksum = gpsession::checksum($gpAdmin); //nothing changes if ($checksum === $checksum_read) { return; } if (!isset($gpAdmin['username'])) { trigger_error('username not set'); die; } $gpAdmin['checksum'] = $checksum; //store the new checksum gpFiles::SaveArray($file, 'gpAdmin', $gpAdmin); }