Skip to content
Snippets Groups Projects
Commit b1a7826d authored by Michael Gapczynski's avatar Michael Gapczynski
Browse files

Check if user is already logged in for DAV auth, instead of logging in and...

Check if user is already logged in for DAV auth, instead of logging in and creating new sessions for every request
parent a1b9b4b4
No related branches found
No related tags found
No related merge requests found
......@@ -31,13 +31,18 @@ class OC_Connector_Sabre_Auth extends Sabre_DAV_Auth_Backend_AbstractBasic {
* @return bool
*/
protected function validateUserPass($username, $password){
OC_Util::setUpFS();//login hooks may need early access to the filesystem
if(OC_User::login($username,$password)){
OC_Util::setUpFS($username);
if (OC_User::isLoggedIn()) {
OC_Util::setupFS($username);
return true;
}
else{
return false;
} else {
OC_Util::setUpFS();//login hooks may need early access to the filesystem
if(OC_User::login($username,$password)){
OC_Util::setUpFS($username);
return true;
}
else{
return false;
}
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment