except remember user, changed all cookies to sessions.
This commit is contained in:
@@ -8,7 +8,7 @@ function request_role_change_form()
|
||||
while ($row = $result->fetch_assoc()) {
|
||||
$roles .= '
|
||||
<label class="form_checkbox_container">' . $row['role'] . '
|
||||
<input name="requested_role" value="' . $row['role_id'] . '" type="radio"' . ($row['role_id'] == $_COOKIE['role_id'] ? ' checked' : '') . '>
|
||||
<input name="requested_role" value="' . $row['role_id'] . '" type="radio"' . ($row['role_id'] == $_SESSION['role_id'] ? ' checked' : '') . '>
|
||||
<span class="checkmark"></span>
|
||||
</label>
|
||||
';
|
||||
|
||||
@@ -19,7 +19,7 @@ function user_view($user_id)
|
||||
// TODO: Allow user to update profile picture.
|
||||
// <button id="update_profile_picture_form_button" class="modal_button underline">Update Profile Picture</button>
|
||||
// <div id="update_profile_picture_form" class="modal_form">' . update_profile_picture_form() . '</div>
|
||||
if ((isset($_COOKIE['user_id']) && $_COOKIE['user_id'] == $user_id) || (isset($_COOKIE['role_id']) && $_COOKIE['role_id'] <= 2)) {
|
||||
if ((isset($_SESSION['user_id']) && $_SESSION['user_id'] == $user_id) || (isset($_SESSION['role_id']) && $_SESSION['role_id'] <= 2)) {
|
||||
$view .= '
|
||||
<h3>User Actions</h3>
|
||||
<div class="user_actions">
|
||||
|
||||
Reference in New Issue
Block a user