Retrieving Security Settings value from database

Retrieving Security Settings value from database

by John Lu -
Number of replies: 5

I was wondering where can I retrieve the value that I turned on in 

/admin/settings.php?section=httpsecurity

where I ticked Use HTTPS for logins 

Thanks

Average of ratings: -
In reply to John Lu

Re: Retrieving Security Settings value from database

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

If you are actually asking, "how do I turn off https logins that I turned on by mistake and now I am locked out?"...

In your config.php file add a line...

$CFG->loginhttps = 0;


In reply to Howard Miller

Re: Retrieving Security Settings value from database

by John Lu -

Not exactly, more specifically I want to know where does

$CFG->loginhttps = 0;
loginhttps is store in the database, which table?
In reply to John Lu

Re: Retrieving Security Settings value from database

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

The 'config' table (probably mdl_config). Where 'name' = 'loginhttps'. 

In reply to Howard Miller

Re: Retrieving Security Settings value from database

by John Lu -

Found it! Thanks!

In reply to Howard Miller

Re: Retrieving Security Settings value from database

by Mark Sharp -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Just to note, the settings set in config.php will override anything in the database.