summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-03-26 21:08:16 -0400
committerFrederic Guillot <fred@kanboard.net>2016-03-26 21:08:16 -0400
commit8cae5d8da1d7d45d30c95c12203e2b0df7400e77 (patch)
tree10d55308359ad57fea328507587d6043e80fd60c /app
parent88d956196622c70a9a16bab0cb01e50c9788436c (diff)
Fix PHP 5.3 issue
Diffstat (limited to 'app')
-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))) {