mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-15 05:00:49 +08:00
login update user lang
This commit is contained in:
@@ -470,20 +470,26 @@ function arr_set(&$array, $key, $value)
|
||||
|
||||
function isHttps(): bool
|
||||
{
|
||||
$schema = nexus()->getRequestSchema();
|
||||
return $schema == 'https';
|
||||
if (isRunningInConsole()) {
|
||||
$securityLogin = get_setting("security.securelogin");
|
||||
if ($securityLogin != "no") {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return nexus()->getRequestSchema() == 'https';
|
||||
}
|
||||
|
||||
|
||||
function getSchemeAndHttpHost()
|
||||
function getSchemeAndHttpHost(bool $fromConfig = false)
|
||||
{
|
||||
global $BASEURL;
|
||||
if (isRunningInConsole()) {
|
||||
return $BASEURL;
|
||||
if (isRunningInConsole() || $fromConfig) {
|
||||
$host = get_setting("basic.BASEURL");
|
||||
} else {
|
||||
$host = nexus()->getRequestHost();
|
||||
}
|
||||
$isHttps = isHttps();
|
||||
$protocol = $isHttps ? 'https' : 'http';
|
||||
$host = nexus()->getRequestHost();
|
||||
return "$protocol://" . $host;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user