Function $user->delete(); does't delete user's elements (calendar, ...)

Discuss about Group-Office development here

Moderator: Developers

michaeled
Posts: 86
Joined: Wed May 09, 2012 2:00 pm

Function $user->delete(); does't delete user's elements (calendar, ...)

Postby michaeled » Thu Feb 18, 2016 1:52 pm

Hi,

We have a php code which delete user with something like this :

Code: Select all

$userName=".....";
$user = \GO\Base\Model\User::model()->findSingleByAttribute('username', $userName);
$user->delete();


This code delete the user, but calendar, tasks, ... belong to the user is still present (see attachment). And the calendar has no more propriotary...
bugDelete1.jpg
Calendar
bugDelete1.jpg (53.71 KiB) Viewed 1394 times

bugDelete2.jpg
Adressbook
bugDelete2.jpg (45.37 KiB) Viewed 1394 times

bugDelete3.jpg
tasks
bugDelete3.jpg (37.99 KiB) Viewed 1394 times

(Version: 6.1.76)

What function have I to call to delete this elements ?

Thak you for your help,

Michael
mschering
Site Admin
Site Admin
Posts: 8154
Joined: Tue Apr 20, 2004 1:06 pm
Location: The Netherlands - Den Bosch
Contact:

Re: Function $user->delete(); does't delete user's elements (calendar, ...)

Postby mschering » Thu Feb 25, 2016 9:24 am

Normally it does do that. with an event. Maybe you have to clear the server cache by running ?r=maintenance/upgrade.
Best regards,

Merijn Schering
Intermesh

Return to “Development Chats”

Who is online

Users browsing this forum: No registered users and 1 guest

cron