From 4d3642b1bc5971c2877bc809e1396eb736aef636 Mon Sep 17 00:00:00 2001 From: Daniel Lamb Date: Thu, 11 Jul 2013 12:46:39 -0300 Subject: [PATCH] Logging in as user 1 on solution pack uninstalls as well. --- includes/solution_packs.inc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/includes/solution_packs.inc b/includes/solution_packs.inc index 4e43a4c3..8e726f34 100644 --- a/includes/solution_packs.inc +++ b/includes/solution_packs.inc @@ -336,6 +336,15 @@ function islandora_install_solution_pack($module, $op = 'install') { * directly for each solution pack. */ function islandora_uninstall_solution_pack($module) { + + // Login as user 1 if the uninstall is coming from the command line (e.g. + // drush). + if (drupal_is_cli()) { + global $user; + $user = user_load(1); + user_login_finalize(); + } + $t = get_t(); module_load_include('module', 'islandora', 'islandora'); module_load_include('inc', 'islandora', 'includes/utilities');