implement getCurrentUser in Sabre Auth Connector, fixes #508

This commit is contained in:
Arthur Schiwon 2012-12-13 01:30:34 +01:00
parent 4466e06e7d
commit 627da205b3
1 changed files with 15 additions and 0 deletions

View File

@ -45,4 +45,19 @@ class OC_Connector_Sabre_Auth extends Sabre_DAV_Auth_Backend_AbstractBasic {
}
}
}
/**
* Returns information about the currently logged in username.
*
* If nobody is currently logged in, this method should return null.
*
* @return string|null
*/
public function getCurrentUser() {
$user = OC_User::getUser();
if(!$user) {
return null;
}
return $user;
}
}