Fix PHP 5.3 issue
This commit is contained in:
@@ -320,10 +320,9 @@ class User extends Base
|
|||||||
*/
|
*/
|
||||||
public function remove($user_id)
|
public function remove($user_id)
|
||||||
{
|
{
|
||||||
return $this->db->transaction(function (Database $db) use ($user_id) {
|
$this->avatarFile->remove($user_id);
|
||||||
|
|
||||||
// Remove Avatar
|
return $this->db->transaction(function (Database $db) use ($user_id) {
|
||||||
$this->avatarFile->remove($user_id);
|
|
||||||
|
|
||||||
// All assigned tasks are now unassigned (no foreign key)
|
// All assigned tasks are now unassigned (no foreign key)
|
||||||
if (! $db->table(Task::TABLE)->eq('owner_id', $user_id)->update(array('owner_id' => 0))) {
|
if (! $db->table(Task::TABLE)->eq('owner_id', $user_id)->update(array('owner_id' => 0))) {
|
||||||
|
|||||||
Reference in New Issue
Block a user