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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
die_coolen_jungs
our_own_cloud_project
Commits
374e3475
Commit
374e3475
authored
11 years ago
by
Robin Appelman
Browse files
Options
Downloads
Patches
Plain Diff
Also remove the user's home storage from the storage table when deleting a user
parent
9851727b
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/private/files/cache/storage.php
+13
-0
13 additions, 0 deletions
lib/private/files/cache/storage.php
lib/private/user.php
+3
-0
3 additions, 0 deletions
lib/private/user.php
with
16 additions
and
0 deletions
lib/private/files/cache/storage.php
+
13
−
0
View file @
374e3475
...
@@ -70,4 +70,17 @@ class Storage {
...
@@ -70,4 +70,17 @@ class Storage {
return
false
;
return
false
;
}
}
}
}
/**
* remove the entry for the storage
*
* @param string $storageId
*/
public
static
function
remove
(
$storageId
)
{
if
(
strlen
(
$storageId
)
>
64
)
{
$storageId
=
md5
(
$storageId
);
}
$sql
=
'DELETE FROM `*PREFIX*storages` WHERE `id` = ?'
;
\OC_DB
::
executeAudited
(
$sql
,
array
(
$storageId
));
}
}
}
This diff is collapsed.
Click to expand it.
lib/private/user.php
+
3
−
0
View file @
374e3475
...
@@ -205,6 +205,9 @@ class OC_User {
...
@@ -205,6 +205,9 @@ class OC_User {
// Delete user files in /data/
// Delete user files in /data/
OC_Helper
::
rmdirr
(
\OC_User
::
getHome
(
$uid
));
OC_Helper
::
rmdirr
(
\OC_User
::
getHome
(
$uid
));
// Delete the users entry in the storage table
\OC\Files\Cache\Storage
::
remove
(
'home::'
.
$uid
);
// Remove it from the Cache
// Remove it from the Cache
self
::
getManager
()
->
delete
(
$uid
);
self
::
getManager
()
->
delete
(
$uid
);
}
}
...
...
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