diff --git a/users/edit-alias.php b/users/edit-alias.php index ea18ac8e..3e029f05 100644 --- a/users/edit-alias.php +++ b/users/edit-alias.php @@ -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: */ -?> +?> \ No newline at end of file