Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Access to admin panel without login
#1
While developing a site (e.g. in localhost, before going live) it can be annoying having to log in again when your session expires.

This patch gives you anonymous access to the admin panel, no login.

** USE WITH CARE!! **
(not for public sites)


Edit admin/inc/cookie_funcions.php, and look for this (around line 50):
Code:
function cookie_check($cookie_name=FALSE) {

Just below (before the "if..." line) insert this:
Code:
return TRUE; break; // NO LOGIN!!

If you want to have to login again, just remove that line from the file.
Reply
#2
Thank you Carlos;
I like me it small change; very useful.
Reply
#3
Thank you, Carlos, this comes in very handy while developing a site.

Is it possible to define that in gsconfig.php via a true/false statement? That would be very helpful for absentminded people like me Smile
Reply
#4
Code:
if (defined('GSNOLOGIN') && GSNOLOGIN) return TRUE; // patch - access panel without login

gsconfig:
Code:
define('GSNOLOGIN', true);

(not tested)
Reply
#5
It works perfectly - thank you very much :-)
Reply
#6
Id make sure to remove that code in prod still, too easy to just inject a global and bypass logins.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#7
I'll keep that in mind, thank you for your advice.
Reply
#8
Of course as I said in the first post, this is not for public or production sites. Just for local development sites. It's too risky.
Reply




Users browsing this thread: 1 Guest(s)
Free HDTV Channels Residential Solar Panels