[Pkg-owncloud-commits] [owncloud] 217/394: implement getCurrentUser in Sabre Auth Connector, fixes #508

David Prévot taffit at alioth.debian.org
Fri Nov 8 23:12:09 UTC 2013


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to annotated tag v4.5.10
in repository owncloud.

commit 5f30c84cd4dea4207df36c7f6cca39abe9288458
Author: Arthur Schiwon <blizzz at owncloud.com>
Date:   Thu Dec 13 01:30:34 2012 +0100

    implement getCurrentUser in Sabre Auth Connector, fixes #508
---
 lib/connector/sabre/auth.php |   15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/lib/connector/sabre/auth.php b/lib/connector/sabre/auth.php
index 4224dbb..6990d92 100644
--- a/lib/connector/sabre/auth.php
+++ b/lib/connector/sabre/auth.php
@@ -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;
+	}
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list