$options['reason'] = self::getAuthError();
}
- if (isset($options['app'])) {
- $params['app'] = $options['app'];
- }
-
- if (empty($params['app']) ||
- ($params['app'] == 'horde') ||
+ if (empty($options['app']) ||
+ ($options['app'] == 'horde') ||
($options['reason'] == self::REASON_LOGOUT)) {
$params = array(
'horde_logout_token' => Horde::getRequestToken('horde.logout'),
);
}
+ if (isset($options['app'])) {
+ $params['app'] = $options['app'];
+ }
+
if ($options['reason']) {
$params[self::REASON_PARAM] = $options['reason'];
if ($options['reason'] == self::REASON_MESSAGE) {