MDL-54928 notifications: Retrieve username from DB if empty