Add user data option
(cherry picked from commit a65212c48eda0aace00497e490ce89007326f5e7)