use Config-class, check auth first, fixed redirect

pull/26/head
Martin Oemus 8 years ago
parent 9aba43ee48
commit 6a6e1c8352

@ -22,15 +22,15 @@ $rel_path = '../';
require_once('../common.php');
$smarty->assign ('smarty_template', 'users_edit-alias');
authentication_require_role('user');
$USERID_USERNAME = authentication_get_username();
// is edit-alias support enabled in $CONF ?
if($CONF['edit_alias'] == 'NO') {
header ("Location: $Return_url");
if (! Config::bool('edit_alias')) {
header ("Location: main.php");
exit(0);
}
authentication_require_role('user');
$USERID_USERNAME = authentication_get_username();
$ah = new AliasHandler();
$ah->init($USERID_USERNAME);
@ -145,4 +145,4 @@ if ($_SERVER['REQUEST_METHOD'] == "POST")
}
/* vim: set expandtab softtabstop=4 tabstop=4 shiftwidth=4: */
?>
?>
Loading…
Cancel
Save