Do I need to use hook_views_data like a custom table?
2 Answers
Actually, this can be done within the Views UI by selecting the user:data field and then choosing a key.
-
It only works if the data is not serialized, or have I overseen an option to output serialized user data in views?– Elin Y.Commented Feb 19, 2020 at 15:24
You need to first add relationship with 'author' in the view and accordingly you will get the user data fields which you can use in your fields as well as in filters.
$user->data
. Anyhow, have you tried creating a User view?$user->data['topic']
.