summaryrefslogtreecommitdiff
path: root/app/Model
diff options
context:
space:
mode:
Diffstat (limited to 'app/Model')
-rw-r--r--app/Model/User.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/app/Model/User.php b/app/Model/User.php
index b093d55f..57993002 100644
--- a/app/Model/User.php
+++ b/app/Model/User.php
@@ -320,10 +320,9 @@ class User extends Base
*/
public function remove($user_id)
{
- return $this->db->transaction(function (Database $db) use ($user_id) {
+ $this->avatarFile->remove($user_id);
- // Remove Avatar
- $this->avatarFile->remove($user_id);
+ return $this->db->transaction(function (Database $db) use ($user_id) {
// All assigned tasks are now unassigned (no foreign key)
if (! $db->table(Task::TABLE)->eq('owner_id', $user_id)->update(array('owner_id' => 0))) {