$user_details['rank'] > $user->rank || // User has a bigger rank.
($user_details['rank'] == $user->rank && $user_details['id'] <> $user->id) // Same rank but not us.
) {
header('Location: access_denied.php');
exit();
}
$user_details['rank'] > $user->rank || // User has a bigger rank.
($user_details['rank'] == $user->rank && $user_details['id'] <> $user->id) // Same rank but not us.
) {
header('Location: access_denied.php');
exit();
}