Find out who created a certain user?

Hook into the actions user_register, profile_update and delete_user, and inspect the current user. Use get_current_user_id() to get the acting user and use …

WP_User::get_data_by( 'id', get_current_user_id() );

… to get more data about the user creating or deleting the other user.

error code: 523