Skip to content

Commit

Permalink
Bug: 13278 Fix removing EAS device pairings via the RemoveUserData API.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed Jun 20, 2014
1 parent a11189e commit 5d5b34a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
5 changes: 0 additions & 5 deletions horde/lib/Api.php
Expand Up @@ -232,11 +232,6 @@ public function removeUserData($user, $app = false)
}

$GLOBALS['registry']->removeUserData($user, $app);

if ($GLOBALS['conf']['activesync']['enabled']) {
$GLOBALS['injector']->getInstance('Horde_ActiveSyncState')
->removeState(array('user' => $user));
}
}

/* Groups. */
Expand Down
11 changes: 11 additions & 0 deletions horde/lib/Application.php
Expand Up @@ -189,6 +189,17 @@ public function removeUserData($user)
}
}

// Remove any activesync device pairings.
if ($GLOBALS['conf']['activesync']['enabled']) {
try {
$GLOBALS['injector']->getInstance('Horde_ActiveSyncState')
->removeState(array('user' => $user));
} catch (Horde_ActiveSync_Exception $e) {
Horde::log($e, 'NOTICE');
$error = true;
}
}

if ($error) {
throw new Horde_Exception(sprintf(_("There was an error removing global data for %s. Details have been logged."), $user));
}
Expand Down

0 comments on commit 5d5b34a

Please sign in to comment.