Get no null object whenn searching for a deleted user

Permalink
When I search for a deleted user with a user ID, I get the the user no. 1 as an answer. I guess I get a null object I can asked for.

Code to get the user
User::getByUserID($userID);


I need to know when a user is deleted.

GunterSchmitt
 
MrKDilkington replied on at Permalink Reply
MrKDilkington
Hi GunterSchmitt,

There is an "on_user_delete" event you might be able to work with.
https://github.com/concrete5/concrete5/blob/develop/web/concrete/src...
GunterSchmitt replied on at Permalink Reply
GunterSchmitt
Hello MrKDilkington,

so, in my oppinion I have two choices:

1. Do somthing, like write something in a Database, during the deletion of the user.
2. Get a user with the ID I had and if the ID of the user I get is diffrent from the used ID I had the user is deleted.

Or is there a api I can use?

Thanks in advance

Gunter