Dear Juan,
Thank you so much for eliminating my confusion.
I -mistakenly- thought and believed that the userid field together with the device token (pushid) in the mdl_user_devices table is connected or related to the courses that the user is enrolled in.
Thanks again for clearing and explaining.
Best Regards