fixed undefined variable (authorities) notice
This commit is contained in:
@@ -187,7 +187,8 @@ if (isset($_POST['action'])) {
|
|||||||
$psw = "null";
|
$psw = "null";
|
||||||
}
|
}
|
||||||
|
|
||||||
$new_coach_id = user::create_user($_POST['ua_name'], $psw, $_POST['authorities']);
|
$authorities = isset($_POST['authorities']) ? $_POST['authorities'] : array();
|
||||||
|
$new_coach_id = user::create_user($_POST['ua_name'], $psw, $authorities);
|
||||||
log::register('new_coach', $new_coach_id);
|
log::register('new_coach', $new_coach_id);
|
||||||
header("Location: /admin/coaches");
|
header("Location: /admin/coaches");
|
||||||
break;
|
break;
|
||||||
@@ -200,7 +201,8 @@ if (isset($_POST['action'])) {
|
|||||||
$psw = "-1"; //ez jelzi h nem szabad updatelni
|
$psw = "-1"; //ez jelzi h nem szabad updatelni
|
||||||
}
|
}
|
||||||
|
|
||||||
user::update_user($_POST['ua_name'], $psw, isset($_POST['ua_admin']), $_POST['ua_id'], $_POST['authorities']);
|
$authorities = isset($_POST['authorities']) ? $_POST['authorities'] : array();
|
||||||
|
user::update_user($_POST['ua_name'], $psw, isset($_POST['ua_admin']), $_POST['ua_id'], $authorities);
|
||||||
log::register('update_coach', $_POST['ua_id']);
|
log::register('update_coach', $_POST['ua_id']);
|
||||||
header("Location: /admin/coaches/".$_POST['ua_id']);
|
header("Location: /admin/coaches/".$_POST['ua_id']);
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user