Merge pull request #7347 from owncloud/patch-headers-already-sent
Fix "headers are already sent" introduced with #6519
This commit is contained in:
commit
fc209a5944
|
@ -227,6 +227,7 @@ class OC_User {
|
||||||
* Log in a user and regenerate a new session - if the password is ok
|
* Log in a user and regenerate a new session - if the password is ok
|
||||||
*/
|
*/
|
||||||
public static function login($uid, $password) {
|
public static function login($uid, $password) {
|
||||||
|
session_regenerate_id(true);
|
||||||
return self::getUserSession()->login($uid, $password);
|
return self::getUserSession()->login($uid, $password);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -157,7 +157,6 @@ class Session implements Emitter, \OCP\IUserSession {
|
||||||
if($user !== false) {
|
if($user !== false) {
|
||||||
if (!is_null($user)) {
|
if (!is_null($user)) {
|
||||||
if ($user->isEnabled()) {
|
if ($user->isEnabled()) {
|
||||||
session_regenerate_id(true);
|
|
||||||
$this->setUser($user);
|
$this->setUser($user);
|
||||||
$this->setLoginName($uid);
|
$this->setLoginName($uid);
|
||||||
$this->manager->emit('\OC\User', 'postLogin', array($user, $password));
|
$this->manager->emit('\OC\User', 'postLogin', array($user, $password));
|
||||||
|
|
Loading…
Reference in New Issue