Jump to content

How can I let admins through via the maintenance?


TeddyKiller

Recommended Posts

I'm wondering.. if my website is set to undergoing maintenance.. how would I like admins in only.

 

You won't be able to login.. so really the only option is I.P's, although some peoples I.P's change often. (Like mine for example, mine changes.. every 2 days!)

 

Wondering if theres any solution to this?

Link to comment
Share on other sites

I'm wondering.. if my website is set to undergoing maintenance.. how would I like admins in only.

 

You won't be able to login.. so really the only option is I.P's, although some peoples I.P's change often. (Like mine for example, mine changes.. every 2 days!)

 

Wondering if theres any solution to this?

 

Front-end and back-end is separated whenever you perform maintenance this means that the front-end will get a page like "Website is undergoing maintenance". The back-end remains the same now to let admins view those changes you simply give the "Website is undergoing maintenance" to anyone that does not have an active session or has an active session but is not an admin.

 

if (isset($_SESSION['user_role']) && $_SESSION['user_role'] === ROLE_ADMIN) {
    //show page
} else {
    //show "website under maintenance" page
}

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.