aboutsummaryrefslogtreecommitdiffstats
path: root/lib/connector/sabre
diff options
context:
space:
mode:
authorJakob Sack <mail@jakobsack.de>2012-03-02 20:37:49 +0100
committerJakob Sack <mail@jakobsack.de>2012-03-02 20:37:49 +0100
commit90e2962c91a160fb73cb977c0aa431c179e292df (patch)
tree49a5805b91187fc2d42ec6a8dae0558bd433f57b /lib/connector/sabre
parent503e5cada3656a6d9ac519921f4c8bf2614d47bb (diff)
downloadnextcloud-server-90e2962c91a160fb73cb977c0aa431c179e292df.tar.gz
nextcloud-server-90e2962c91a160fb73cb977c0aa431c179e292df.zip
Remove the link between the principals table and the sabre principals connector.
Diffstat (limited to 'lib/connector/sabre')
-rw-r--r--lib/connector/sabre/principal.php44
1 files changed, 0 insertions, 44 deletions
diff --git a/lib/connector/sabre/principal.php b/lib/connector/sabre/principal.php
index 72e180c65c0..28a36438e87 100644
--- a/lib/connector/sabre/principal.php
+++ b/lib/connector/sabre/principal.php
@@ -9,50 +9,6 @@
class OC_Connector_Sabre_Principal implements Sabre_DAVACL_IPrincipalBackend {
/**
- * TODO: write doc
- */
- public static function addPrincipal($params){
- // Add the user
- $uri = 'principals/'.$params['uid'];
- $displayname = $params['uid'];
- $query = OC_DB::prepare('INSERT INTO *PREFIX*principals (uri,displayname) VALUES(?,?)');
- $query->execute(array($uri,$displayname));
-
- // Add calendar and addressbook read and write support (sharing calendars)
- $uri = 'principals/'.$params['uid'].'/calendar-proxy-read';
- $displayname = null;
- $query->execute(array($uri,$displayname));
- $uri = 'principals/'.$params['uid'].'/calendar-proxy-write';
- $query->execute(array($uri,$displayname));
- $uri = 'principals/'.$params['uid'].'/addressbook-proxy-read';
- $query->execute(array($uri,$displayname));
- $uri = 'principals/'.$params['uid'].'/addressbook-proxy-write';
- $query->execute(array($uri,$displayname));
-
- return true;
- }
-
- /**
- * TODO: write doc
- */
- public static function deletePrincipal($params){
- $query = OC_DB::prepare('SELECT * FROM *PREFIX*principals');
- $result = $query->execute();
-
- $deleteprincipal = OC_DB::prepare('DELETE FROM *PREFIX*principals WHERE id = ?');
- $deletegroup = OC_DB::prepare('DELETE FROM *PREFIX*principalgroups WHERE principal_id = ? OR member_id = ?');
- // We have to delete the principals and relations! Principals include
- while($row = $result->fetchRow()){
- // Checking if the principal is in the prefix
- $array = explode('/',$row['uri']);
- if ($array[1] != $params['uid']) continue;
- $deleteprincipal->execute(array($row['id']));
- $deletegroup->execute(array($row['id'],$row['id']));
- }
- return true;
- }
-
- /**
* Returns a list of principals based on a prefix.
*
* This prefix will often contain something like 'principals'. You are only