diff options
author | Morris Jobke <hey@morrisjobke.de> | 2019-01-23 15:31:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-23 15:31:05 +0100 |
commit | e086a5e7f9ed896d38479dc9e57c633cf3a4ce66 (patch) | |
tree | 55dc582d71660bfcdc3671e65cbf9ec2986a2dc0 /core | |
parent | 09db2bc7014f15c29243eb47e9758542b6e0ada2 (diff) | |
parent | 4d3bb0a521b03a375db8bd9ab7bc3aad3ca93f9f (diff) | |
download | nextcloud-server-e086a5e7f9ed896d38479dc9e57c633cf3a4ce66.tar.gz nextcloud-server-e086a5e7f9ed896d38479dc9e57c633cf3a4ce66.zip |
Merge pull request #13758 from nextcloud/backport/13747/stable15
[stable15] Honor remember_login_cookie_lifetime
Diffstat (limited to 'core')
-rw-r--r-- | core/Controller/LoginController.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/core/Controller/LoginController.php b/core/Controller/LoginController.php index 40e13b43c80..64899304d78 100644 --- a/core/Controller/LoginController.php +++ b/core/Controller/LoginController.php @@ -329,7 +329,14 @@ class LoginController extends Controller { // TODO: remove password checks from above and let the user session handle failures // requires https://github.com/owncloud/core/pull/24616 $this->userSession->completeLogin($loginResult, ['loginName' => $user, 'password' => $password]); - $this->userSession->createSessionToken($this->request, $loginResult->getUID(), $user, $password, IToken::REMEMBER); + + $tokenType = IToken::REMEMBER; + if ((int)$this->config->getSystemValue('remember_login_cookie_lifetime', 60*60*24*15) === 0) { + $remember_login = false; + $tokenType = IToken::DO_NOT_REMEMBER; + } + + $this->userSession->createSessionToken($this->request, $loginResult->getUID(), $user, $password, $tokenType); $this->userSession->updateTokens($loginResult->getUID(), $password); // User has successfully logged in, now remove the password reset link, when it is available |