Skip to content

Commit

Permalink
Change purge availability
Browse files Browse the repository at this point in the history
The current user is also able to purge their own data, not only available to admins
  • Loading branch information
annda committed Mar 6, 2022
1 parent 80a44ab commit 9018790
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions helper.php
Expand Up @@ -424,7 +424,7 @@ public function del($namespace, $attribute, $user = null)

/**
* Deletes all attribute data for a specified namespace for a user. Only
* useable by an admin.
* usable the user themselves or an admin.
*
* @param string $namespace
* @param string $user
Expand All @@ -437,9 +437,7 @@ public function purge($namespace, $user)
return false;
}

// Ensure this user purges their own data or is an admin.
global $INFO;
if(!$INFO['isadmin']) {
if ($this->validateUser($user) === null) {
return false;
}

Expand Down

0 comments on commit 9018790

Please sign in to comment.