From afdc5bf264cbb061807d1d34a9ca451fd5eb72a4 Mon Sep 17 00:00:00 2001
From: Arthur Schiwon <blizzz@owncloud.com>
Date: Fri, 20 Jul 2012 16:28:20 +0200
Subject: [PATCH] LDAP: switch user backend from extending class
 OC_User_Backend to implementing OC_User_Interface for improved flexibility

---
 apps/user_ldap/user_ldap.php | 25 ++++++++++++++++++++++++-
 1 file changed, 24 insertions(+), 1 deletion(-)

diff --git a/apps/user_ldap/user_ldap.php b/apps/user_ldap/user_ldap.php
index b51d9a55cc..7ff9b23af0 100644
--- a/apps/user_ldap/user_ldap.php
+++ b/apps/user_ldap/user_ldap.php
@@ -23,7 +23,7 @@
  *
  */
 
-class OC_USER_LDAP extends OC_User_Backend {
+class OC_USER_LDAP implements OCP\UserInterface {
 
 	// cached settings
 	protected $ldapUserFilter;
@@ -139,4 +139,27 @@ class OC_USER_LDAP extends OC_User_Backend {
 		return true;
 	}
 
+	/**
+	* @brief delete a user
+	* @param $uid The username of the user to delete
+	* @returns true/false
+	*
+	* Deletes a user
+	*/
+	public function deleteUser($uid) {
+		return false;
+	}
+
+	/**
+	* @brief Check if backend implements actions
+	* @param $actions bitwise-or'ed actions
+	* @returns boolean
+	*
+	* Returns the supported actions as int to be
+	* compared with OC_USER_BACKEND_CREATE_USER etc.
+	*/
+	public function implementsActions($actions) {
+		return (bool)(OC_USER_BACKEND_CHECK_PASSWORD & $actions);
+	}
+
 }
\ No newline at end of file
-- 
GitLab