Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Remove password to Admin
#1
I have been going through the code of the Admin - Is there a way to not have a password at all? Can you make it where can go straight into the CMS? By doing this I can password protect it myself. Has this been tried successfully or do you know how to make it happen?
Reply
#2
http://get-simple.info/forum/topic/980/a...out-login/
Reply
#3
Carlos Wrote:http://get-simple.info/forum/topic/980/a...out-login/

Carlos -

This post is a little older - what version was this?

Here is what I am seeing in my code.

function get_cookie($cookie_name) {
if(cookie_check($cookie_name)==TRUE) {
return $_COOKIE[$cookie_name];
}
}

Does it work the same because I tried it and nothing happened. Any suggestions? Thanks again,
Reply
#4
It possibly was for GS 2.03, sorry. Did a quick test and it seemed to work (only change was line 56 instead of 50) but I was logged when I checked it, I believe.

I'll post and updated patch later (I have done it, but let me test it a bit).
Reply
#5
Carlos Wrote:It possibly was for GS 2.03, sorry. Did a quick test and it seemed to work (only change was line 56 instead of 50) but I was logged when I checked it, I believe.

I'll post and updated patch later (I have done it, but let me test it a bit).

Awesome - look forward to that and appreciate it.
Reply
#6
(Patch for GetSimple 3.1.2)

1. Edit admin/inc/cookie_functions.php, line 57. Just after this:
Code:
function cookie_check() {
insert this:
Code:
if (defined('GSALWAYSLOGGEDUSER')) return TRUE;

2. Edit admin/inc/common.php, line 122 (blank line). Paste this:
Code:
if (defined('GSALWAYSLOGGEDUSER')) $_COOKIE['GS_ADMIN_USERNAME'] = GSALWAYSLOGGEDUSER;
(just before the grab user data comment line)

These 2 changes will not affect GS's normal behaviour.


Now, to activate the 'always logged in' mode, edit your gsconfig.php and insert this somewhere (e.g. near the end of the file, before the ?>):

Code:
# Caution! Only use for testing in local environments or with alternative security measures
define('GSALWAYSLOGGEDUSER','administrator');

Change administrator to your preferred (existing) username.


To disable this, you can just remove that gsconfig setting or uncomment it by inserting a # before the define...
Reply
#7
Carlos Wrote:# Caution! Only use for testing in local environments or with alternative security measures
define('GSALWAYSLOGGEDUSER','administrator');

Genius! Excellent layout and explanation and worked flawlessly. I appreciate your help and figuring this out for me.
Reply
#8
Carlos Wrote:(Patch for GetSimple 3.1.2)

1. Edit admin/inc/cookie_functions.php, line 57. Just after this:
Code:
function cookie_check() {
insert this:
Code:
if (defined('GSALWAYSLOGGEDUSER')) return TRUE;

2. Edit admin/inc/common.php, line 122 (blank line). Paste this:
Code:
if (defined('GSALWAYSLOGGEDUSER')) $_COOKIE['GS_ADMIN_USERNAME'] = GSALWAYSLOGGEDUSER;
(just before the grab user data comment line)

These 2 changes will not affect GS's normal behaviour.


Now, to activate the 'always logged in' mode, edit your gsconfig.php and insert this somewhere (e.g. near the end of the file, before the ?>):

Code:
# Caution! Only use for testing in local environments or with alternative security measures
define('GSALWAYSLOGGEDUSER','administrator');

Change administrator to your preferred (existing) username.


To disable this, you can just remove that gsconfig setting or uncomment it by inserting a # before the define...

Carlos -

working through another problem with the removal. Everything worked great but then noticed it removed the text option on pages. You can now only use HTML as it does not give you the text option. Do you have any ideas on this? I am playing around with it now and not finding a resolve.

thanks,
Reply
#9
ohspublishing Wrote:
Carlos Wrote:(Patch for GetSimple 3.1.2)

1. Edit admin/inc/cookie_functions.php, line 57. Just after this:
Code:
function cookie_check() {
insert this:
Code:
if (defined('GSALWAYSLOGGEDUSER')) return TRUE;

2. Edit admin/inc/common.php, line 122 (blank line). Paste this:
Code:
if (defined('GSALWAYSLOGGEDUSER')) $_COOKIE['GS_ADMIN_USERNAME'] = GSALWAYSLOGGEDUSER;
(just before the grab user data comment line)

These 2 changes will not affect GS's normal behaviour.


Now, to activate the 'always logged in' mode, edit your gsconfig.php and insert this somewhere (e.g. near the end of the file, before the ?>):

Code:
# Caution! Only use for testing in local environments or with alternative security measures
define('GSALWAYSLOGGEDUSER','administrator');

Change administrator to your preferred (existing) username.


To disable this, you can just remove that gsconfig setting or uncomment it by inserting a # before the define...

Carlos -

working through another problem with the removal. Everything worked great but then noticed it removed the text option on pages. You can now only use HTML as it does not give you the text option. Do you have any ideas on this? I am playing around with it now and not finding a resolve.

thanks,

Carlos -

Sorry to be such a bother but I found the issue.

Change the Config in the main directory and then change the cookie functions. Keep the common.php file alone.
Reply
#10
I don't understand your problems...

Just in case: I forgot to make it clear that this patch will only work with one GS user (the "always logged" one you define in gsconfig).
Reply
#11
Carlos Wrote:I don't understand your problems...

Just in case: I forgot to make it clear that this patch will only work with one GS user (the "always logged" one you define in gsconfig).


What I was wanting is to remove the login. With the steps you gave me it removed the login so I don't have to login each time. But, from doing these few steps it caused the page editor to only have the html part. So when I remove the admin section I am unable to use text on the pages but only HTML.
Reply
#12
To make this patch work properly:

- You have to do both changes to the GS core at once.

- You have to add the define line to gsconfig, changing the administrator string by your username ('administrator' is just an example, like 'admin' or 'user')

[update] Also, your GS user must exist before patching. That is, GS must have been installed previously.
Reply




Users browsing this thread: 1 Guest(s)