Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User profile fixes #868

Merged
merged 2 commits into from
Jan 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions inc_all_user.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

require_once "check_login.php";

validateAdminRole();

require_once "header.php";

require_once "top_nav.php";
Expand Down
5 changes: 5 additions & 0 deletions post/profile.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@

$new_password = trim($_POST['new_password']);

if (empty($new_password)) {
header('Location: user_security.php');
exit;
}

// Email notification when password or email is changed
$user_sql = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT user_name, user_email FROM users WHERE user_id = $session_user_id"));
$name = sanitizeInput($user_sql['user_name']);
Expand Down
4 changes: 2 additions & 2 deletions user_security.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
<input type="hidden" name="csrf_token" value="<?php echo $_SESSION['csrf_token'] ?>">

<div class="form-group">
<label>Your New Password</label>
<label>Your New Password <strong class="text-danger">*</strong></label>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-fw fa-lock"></i></span>
</div>
<input type="password" class="form-control" data-toggle="password" name="new_password" placeholder="Leave blank for no change" autocomplete="new-password" minlength="8">
<input type="password" class="form-control" data-toggle="password" name="new_password" placeholder="Leave blank for no change" autocomplete="new-password" minlength="8" required>
<div class="input-group-append">
<span class="input-group-text"><i class="fa fa-fw fa-eye"></i></span>
</div>
Expand Down
Loading