Issue With session_destroy() And A Few Other Suggestions #41
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem I :
Logout function run session_destroy(). Destroying all active session of the website.
Solution :
Change all phpMiniAdmin session variables into $_SESSION['pmAdmin'], so we can just use unset($_SESSION['pmAdmin']) instead of session_destroy(). So it doesn't destroy the whole website active session
Suggestion I :
Move phpminiconfig.php include line (from line 32 to line 53), so the config can override all previous variables above it
Adding few line in the config file for example ($authPage, default timezone, display_errors) if Suggestion I is accepted
Suggestion II :
Adding your own user privilege authenticator $authPage (if any). Instead of using $ACCESS_PWD as an authenticator, your ability to open phpMiniAdmin would be dictated by whether you're already login from the main website / main auth function or not.
Example :
$authPage = "session.php"; //Will include session.php if file exist