Commit 5e14bb30 authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review
Browse files

Merge "Logout setting of cookie breaks upgrade from pre 1.9 to 1.9+ (Bug #1353153)" into 1.9_STABLE

parents 506068c6 53d73327
......@@ -1472,8 +1472,13 @@ class LiveUser extends User {
* Logs the current user out
*/
public function logout () {
// add long-term cookie to record institution user last used
set_cookie('lastinstitution', $this->sitepages_institutionname_by_theme('loggedouthome'), '2240561472', true);
// Add long-term cookie to record institution user last used.
// We can only do if the institution_config table exists,
// which it will not if we are upgrading from pre 1.9 so we check when
// the institution_config table was added.
if (get_config('version') >= '2014010800') {
set_cookie('lastinstitution', $this->sitepages_institutionname_by_theme('loggedouthome'), '2240561472', true);
}
require_once(get_config('libroot') . 'ddl.php');
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment