GetSimple Support Forum
Access to admin panel without login - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: Scripts & Components (http://get-simple.info/forums/forumdisplay.php?fid=11)
+--- Thread: Access to admin panel without login (/showthread.php?tid=890)



Access to admin panel without login - Carlos - 2010-08-08

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.


Access to admin panel without login - cumbe - 2010-08-14

Thank you Carlos;
I like me it small change; very useful.


RE: Access to admin panel without login - smsHH - 2017-05-19

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


RE: Access to admin panel without login - Carlos - 2017-05-20

Code:
if (defined('GSNOLOGIN') && GSNOLOGIN) return TRUE; // patch - access panel without login

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

(not tested)


RE: Access to admin panel without login - smsHH - 2017-05-20

It works perfectly - thank you very much :-)


RE: Access to admin panel without login - shawn_a - 2017-05-20

Id make sure to remove that code in prod still, too easy to just inject a global and bypass logins.


RE: Access to admin panel without login - smsHH - 2017-05-20

I'll keep that in mind, thank you for your advice.


RE: Access to admin panel without login - Carlos - 2017-05-20

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.