|
|
@ -295,15 +295,15 @@ class Session implements IUserSession, Emitter { |
|
|
public function getLoginName() { |
|
|
public function getLoginName() { |
|
|
if ($this->activeUser) { |
|
|
if ($this->activeUser) { |
|
|
return $this->session->get('loginname'); |
|
|
return $this->session->get('loginname'); |
|
|
} else { |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
$uid = $this->session->get('user_id'); |
|
|
$uid = $this->session->get('user_id'); |
|
|
if ($uid) { |
|
|
if ($uid) { |
|
|
$this->activeUser = $this->manager->get($uid); |
|
|
$this->activeUser = $this->manager->get($uid); |
|
|
return $this->session->get('loginname'); |
|
|
return $this->session->get('loginname'); |
|
|
} else { |
|
|
|
|
|
return null; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return null; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
@ -369,11 +369,11 @@ class Session implements IUserSession, Emitter { |
|
|
if($this->isLoggedIn()) { |
|
|
if($this->isLoggedIn()) { |
|
|
$this->prepareUserLogin($firstTimeLogin, $regenerateSessionId); |
|
|
$this->prepareUserLogin($firstTimeLogin, $regenerateSessionId); |
|
|
return true; |
|
|
return true; |
|
|
} else { |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
$message = \OC::$server->getL10N('lib')->t('Login canceled by app'); |
|
|
$message = \OC::$server->getL10N('lib')->t('Login canceled by app'); |
|
|
throw new LoginException($message); |
|
|
throw new LoginException($message); |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* Tries to log in a client |
|
|
* Tries to log in a client |
|
|
|