Fix PHP 5.3 issue
This commit is contained in:
parent
88d9561966
commit
8cae5d8da1
|
|
@ -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))) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue