Check if user is already logged in for DAV auth, instead of logging in and creating new sessions for every request
This commit is contained in:
parent
01f25119d5
commit
89027545a0
|
@ -31,6 +31,10 @@ class OC_Connector_Sabre_Auth extends Sabre_DAV_Auth_Backend_AbstractBasic {
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
protected function validateUserPass($username, $password){
|
protected function validateUserPass($username, $password){
|
||||||
|
if (OC_User::isLoggedIn()) {
|
||||||
|
OC_Util::setupFS($username);
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
OC_Util::setUpFS();//login hooks may need early access to the filesystem
|
OC_Util::setUpFS();//login hooks may need early access to the filesystem
|
||||||
if(OC_User::login($username,$password)){
|
if(OC_User::login($username,$password)){
|
||||||
OC_Util::setUpFS($username);
|
OC_Util::setUpFS($username);
|
||||||
|
@ -40,4 +44,5 @@ class OC_Connector_Sabre_Auth extends Sabre_DAV_Auth_Backend_AbstractBasic {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue