Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
our_own_cloud_project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
die_coolen_jungs
our_own_cloud_project
Commits
11725efd
Commit
11725efd
authored
12 years ago
by
Georg Ehrke
Browse files
Options
Downloads
Patches
Plain Diff
add some hooks for subadmins
parent
5508a950
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/subadmin.php
+24
-1
24 additions, 1 deletion
lib/subadmin.php
with
24 additions
and
1 deletion
lib/subadmin.php
+
24
−
1
View file @
11725efd
...
...
@@ -19,7 +19,8 @@
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
OC_Hook
::
connect
(
'OC_User'
,
'post_deleteUser'
,
'OC_SubAdmin'
,
'post_deleteUser'
);
OC_Hook
::
connect
(
'OC_User'
,
'post_deleteGroup'
,
'OC_SubAdmin'
,
'post_deleteGroup'
);
/**
* This class provides all methods needed for managing groups.
*
...
...
@@ -155,4 +156,26 @@ class OC_SubAdmin{
public
static
function
isGroupAccessible
(
$subadmin
,
$group
){
return
self
::
isSubAdminofGroup
(
$subadmin
,
$group
);
}
/**
* @brief delete all SubAdmins by uid
* @param $parameters
* @return boolean
*/
public
static
function
post_deleteUser
(
$parameters
){
$stmt
=
OC_DB
::
prepare
(
'DELETE FROM *PREFIX*group_admin WHERE uid = ?'
);
$result
=
$stmt
->
execute
(
array
(
$parameters
[
'uid'
]));
return
true
;
}
/**
* @brief delete all SubAdmins8 by gid
* @param $parameters
* @return boolean
*/
public
static
function
post_deleteGroup
(
$parameters
){
$stmt
=
OC_DB
::
prepare
(
'DELETE FROM *PREFIX*group_admin WHERE gid = ?'
);
$result
=
$stmt
->
execute
(
array
(
$parameters
[
'gid'
]));
return
true
;
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment