Permalink
Browse files

MDL-33562 lib: remove deleted user tokens

  • Loading branch information...
danpoltawski committed May 17, 2013
1 parent 27bab16 commit 20431aacf8ae894718ba2b7181a564563e96271b
Showing with 10 additions and 2 deletions.
  1. +9 −0 lib/db/upgrade.php
  2. +1 −2 version.php
View
@@ -1740,5 +1740,14 @@ function xmldb_main_upgrade($oldversion) {
upgrade_main_savepoint(true, 2012120304.01);
}
if ($oldversion < 2012120304.04) {
// Clean up old tokens which haven't been deleted.
$DB->execute("DELETE FROM {user_private_key} WHERE NOT EXISTS
(SELECT 'x' FROM {user} WHERE deleted = 0 AND id = userid)");
// Main savepoint reached.
upgrade_main_savepoint(true, 2012120304.04);
}
return true;
}
View
@@ -29,8 +29,7 @@
defined('MOODLE_INTERNAL') || die();
$version = 2012120304.03; // 20121203 = branching date YYYYMMDD - do not modify!
$version = 2012120304.04; // 20121203 = branching date YYYYMMDD - do not modify!
// RR = release increments - 00 in DEV branches
// .XX = incremental changes

0 comments on commit 20431aa

Please sign in to comment.