aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'php/admin/users.php')
-rw-r--r--php/admin/users.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/php/admin/users.php b/php/admin/users.php
index c200a70..b3a0d20 100644
--- a/php/admin/users.php
+++ b/php/admin/users.php
@@ -11,7 +11,7 @@ require_once('../cfg/init.php');
if (!empty($_POST['add-submit'])&&!empty($_POST['username'])&&!empty($_POST['password'])&&!empty($_POST['rpassword'])) {
if (Mirror::insert_user($_POST['username'],$_POST['password'],$_POST['rpassword'],$_POST['user_firstname'],$_POST['user_lastname'],$_POST['user_email'])) {
set_msg('User added successfully.');
- header('Location: http://'.$_SERVER['HTTP_HOST'].WEBPATH.'/admin/users.php');
+ header('Location: '.$_SERVER['HTTP_PROTO'].'://'.$_SERVER['HTTP_HOST'].WEBPATH.'/admin/users.php');
exit;
} else {
set_error('User could not be added because of an unknown error.');
@@ -26,7 +26,7 @@ if (!empty($_POST['submit'])) {
if (!empty($_POST['doit'])) {
if (Mirror::update_user($_POST['user_id'],$_POST['username'],$_POST['password'],$_POST['rpassword'],$_POST['user_firstname'],$_POST['user_lastname'],$_POST['user_email'])) {
set_msg('User updated successfully.');
- header('Location: http://'.$_SERVER['HTTP_HOST'].WEBPATH.'/admin/users.php');
+ header('Location: '.$_SERVER['HTTP_PROTO'].'://'.$_SERVER['HTTP_HOST'].WEBPATH.'/admin/users.php');
exit;
} else {
set_error('User update failed.');