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?

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
}

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.