TeddyKiller Posted April 25, 2010 Share Posted April 25, 2010 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 https://forums.phpfreaks.com/topic/199678-how-can-i-let-admins-through-via-the-maintenance/ Share on other sites More sharing options...
teamatomic Posted April 25, 2010 Share Posted April 25, 2010 Have an admin login that ignores the maintenance flag. HTH Teamatomic Link to comment https://forums.phpfreaks.com/topic/199678-how-can-i-let-admins-through-via-the-maintenance/#findComment-1048072 Share on other sites More sharing options...
TeddyKiller Posted April 25, 2010 Author Share Posted April 25, 2010 Ah great. Didn't think of that Thankss Link to comment https://forums.phpfreaks.com/topic/199678-how-can-i-let-admins-through-via-the-maintenance/#findComment-1048114 Share on other sites More sharing options...
ignace Posted April 25, 2010 Share Posted April 25, 2010 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 https://forums.phpfreaks.com/topic/199678-how-can-i-let-admins-through-via-the-maintenance/#findComment-1048126 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.