summaryrefslogtreecommitdiffstats
path: root/lib/private/user.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/user.php')
-rw-r--r--lib/private/user.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/private/user.php b/lib/private/user.php
index 7d1f21cc409..ae98bb9b01a 100644
--- a/lib/private/user.php
+++ b/lib/private/user.php
@@ -162,6 +162,8 @@ class OC_User {
public static function login($loginname, $password) {
$result = self::getUserSession()->login($loginname, $password);
if ($result) {
+ // Refresh the token
+ \OC::$server->getCsrfTokenManager()->refreshToken();
//we need to pass the user name, which may differ from login name
$user = self::getUserSession()->getUser()->getUID();
OC_Util::setupFS($user);
@@ -328,7 +330,7 @@ class OC_User {
return $backend->getLogoutAttribute();
}
- return 'href="' . link_to('', 'index.php') . '?logout=true&requesttoken=' . urlencode(OC_Util::callRegister()) . '"';
+ return 'href="' . link_to('', 'index.php') . '?logout=true&requesttoken=' . urlencode(\OCP\Util::callRegister()) . '"';
}
/**