summaryrefslogtreecommitdiffstats
path: root/lib/subadmin.php
diff options
context:
space:
mode:
authorGeorg Ehrke <dev@georgswebsite.de>2012-07-19 16:43:46 +0200
committerGeorg Ehrke <dev@georgswebsite.de>2012-07-19 16:43:46 +0200
commit05bc541276192c9f1bbe82ea9989872d5f25f49c (patch)
treea86dfe6270671de8c3171b2ead28318493eb86fd /lib/subadmin.php
parent2fc834230a8e5cae4070d0c1f0053e0dc20db1b3 (diff)
downloadnextcloud-server-05bc541276192c9f1bbe82ea9989872d5f25f49c.tar.gz
nextcloud-server-05bc541276192c9f1bbe82ea9989872d5f25f49c.zip
add some doc for lib/subadmin.php
Diffstat (limited to 'lib/subadmin.php')
-rw-r--r--lib/subadmin.php15
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/subadmin.php b/lib/subadmin.php
index 330876536d7..26cf64304db 100644
--- a/lib/subadmin.php
+++ b/lib/subadmin.php
@@ -101,7 +101,9 @@ class OC_SubAdmin{
/**
* @brief checks if a user is a SubAdmin of a group
- * @return array
+ * @param $uid uid of the subadmin
+ * @param $gid gid of the group
+ * @return bool
*/
public static function isSubAdminofGroup($uid, $gid){
$stmt = OC_DB::prepare('SELECT COUNT(*) as count FROM *PREFIX*group_admin where uid = ? AND gid = ?');
@@ -113,6 +115,11 @@ class OC_SubAdmin{
return false;
}
+ /**
+ * @brief checks if a user is a SubAdmin
+ * @param $uid uid of the subadmin
+ * @return bool
+ */
public static function isSubAdmin($uid){
$stmt = OC_DB::prepare('SELECT COUNT(*) as count FROM *PREFIX*group_admin WHERE uid = ?');
$result = $stmt->execute(array($uid));
@@ -123,6 +130,12 @@ class OC_SubAdmin{
return false;
}
+ /**
+ * @brief checks if a user is a accessible by a subadmin
+ * @param $subadmin uid of the subadmin
+ * @param $user uid of the user
+ * @return bool
+ */
public static function isUserAccessible($subadmin, $user){
if(!self::isSubAdmin($subadmin)){
return false;