summaryrefslogtreecommitdiffstats
path: root/lib/api/kolab_api_service_user.php
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2012-03-26 09:22:50 +0200
committerAleksander Machniak <alec@alec.pl>2012-03-26 09:22:50 +0200
commit0b8849e31162e07bdc5dbfef9ea95b3cf3d5c9b8 (patch)
tree32105cbca3f46f88a3e843f5aa012c4b297e89c7 /lib/api/kolab_api_service_user.php
parent079b73cd67fbb7d103fe1e4ba2ffdb97b1a6f390 (diff)
downloadwebadmin-0b8849e31162e07bdc5dbfef9ea95b3cf3d5c9b8.tar.gz
Added more phpdoc comments
Diffstat (limited to 'lib/api/kolab_api_service_user.php')
-rw-r--r--lib/api/kolab_api_service_user.php43
1 files changed, 37 insertions, 6 deletions
diff --git a/lib/api/kolab_api_service_user.php b/lib/api/kolab_api_service_user.php
index a355ac4..b13f40f 100644
--- a/lib/api/kolab_api_service_user.php
+++ b/lib/api/kolab_api_service_user.php
@@ -24,10 +24,17 @@
*/
/**
- *
+ * Service providing user data management
*/
class kolab_api_service_user extends kolab_api_service
{
+ /**
+ * Returns service capabilities.
+ *
+ * @param string $domain Domain name
+ *
+ * @return array Capabilities list
+ */
public function capabilities($domain)
{
return array(
@@ -42,6 +49,14 @@ class kolab_api_service_user extends kolab_api_service
);
}
+ /**
+ * Create user.
+ *
+ * @param array $get GET parameters
+ * @param array $post POST parameters
+ *
+ * @return array|bool User attributes or False on error.
+ */
public function user_add($getdata, $postdata)
{
$uta = $this->user_type_attributes($postdata['user_type_id']);
@@ -87,13 +102,21 @@ class kolab_api_service_user extends kolab_api_service
return $user_attributes;
}
- return FALSE;
+ return false;
}
+ /**
+ * Detete user.
+ *
+ * @param array $get GET parameters
+ * @param array $post POST parameters
+ *
+ * @return bool True on success, False on failure
+ */
public function user_delete($getdata, $postdata)
{
if (!isset($postdata['user'])) {
- return FALSE;
+ return false;
}
// TODO: Input validation
@@ -104,13 +127,21 @@ class kolab_api_service_user extends kolab_api_service
return $result;
}
- return FALSE;
+ return false;
}
+ /**
+ * User information.
+ *
+ * @param array $get GET parameters
+ * @param array $post POST parameters
+ *
+ * @return array|bool User attributes, False on error
+ */
public function user_info($getdata, $postdata)
{
if (!isset($getdata['user'])) {
- return FALSE;
+ return false;
}
$auth = Auth::get_instance();
@@ -146,6 +177,6 @@ class kolab_api_service_user extends kolab_api_service
return $result;
}
- return FALSE;
+ return false;
}
}