Skip to content

Commit

Permalink
use Config-class, check auth first, fixed redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
medarion committed Apr 17, 2017
1 parent 9aba43e commit 6a6e1c8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions users/edit-alias.php
Expand Up @@ -22,15 +22,15 @@
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);

Expand Down Expand Up @@ -145,4 +145,4 @@
}

/* vim: set expandtab softtabstop=4 tabstop=4 shiftwidth=4: */
?>
?>

0 comments on commit 6a6e1c8

Please sign in to comment.