AID-749 Fixed user_id check and log message formatting.