. * */ class OC_Connector_Sabre_Auth extends Sabre_DAV_Auth_Backend_AbstractBasic { /** * Validates a username and password * * This method should return true or false depending on if login * succeeded. * * @return bool */ 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 if(OC_User::login($username,$password)) { OC_Util::setUpFS($username); return true; } else{ return false; } } } }