$auth = Horde_Auth::singleton($conf['auth']['driver']);
if (!$auth->hasCapability('update')) {
$notification->push(_("Changing your password is not supported with the current configuration. Contact your administrator."), 'horde.error');
- header('Location: ' . Horde_Auth::getLoginScreen('', Horde_Util::getFormData('url')));
+ header('Location: ' . Horde::getServiceLink('login')->add('url', Horde_Util::getFormData('url'))->setRaw(true));
exit;
}
$auth = Horde_Auth::singleton($conf['auth']['driver']);
if (!$auth->hasCapability('resetpassword')) {
$notification->push(_("Cannot reset password automatically, contact your administrator."), 'horde.error');
- header('Location: ' . Horde_Auth::getLoginScreen('', Horde_Util::getFormData('url')));
+ header('Location: ' . Horde::getServiceLink('login')->add('url', Horde_Util::getFormData('url'))->setRaw(true));
exit;
}
try {
$mail->send(Horde::getMailerConfig());
$notification->push(_("Your password has been reset, check your email and log in with your new password."), 'horde.success');
- header('Location: ' . Horde_Auth::getLoginScreen('', $info['url']));
+ header('Location: ' . Horde::getServiceLink('login')->add('url', $info['url'])->setRaw(true));
exit;
} catch (Horde_Exception $e) {
Horde::logMessage($e, __FILE__, __LINE__, PEAR_LOG_ERR);
if ($conf['signup']['allow'] !== true ||
!$auth->hasCapability('add')) {
$notification->push(_("User Registration has been disabled for this site."), 'horde.error');
- header('Location: ' . Horde_Auth::getLoginScreen());
+ header('Location: ' . Horde::getServiceLink('login')->setRaw(true));
exit;
}
if (is_a($signup, 'PEAR_Error')) {
Horde::logMessage($signup->getMessage(), __FILE__, __LINE__, PEAR_LOG_ERR);
$notification->push(_("User Registration is not properly configured for this site."), 'horde.error');
- header('Location: ' . Horde_Auth::getLoginScreen());
+ header('Location: ' . Horde::getServiceLink('login')->setRaw(true));
exit;
}
$notification->push(sprintf(_("There was a problem adding \"%s\" to the system: %s"), $info['user_name'], $success->getMessage()), 'horde.error');
} else {
$notification->push($success_message, 'horde.success');
- $url = Horde_Auth::getLoginScreen('', $info['url']);
- header('Location: ' . $url);
+ header('Location: ' . Horde::getServiceLink('login')->add('url', $info['url'])->setRaw(true));
exit;
}
}