I have added new user meta for a given user. Let's call it title
. Every time I run
$user = get_user_by('login',$username);
update_user_meta($user->ID, 'title','Manager');
The meta is not updated. Instead, a new row gets added to the wp_usermeta
table for this user
-> meta_key
-> meta_value
with a new umeta_id
.
Also, the meta is not available via get_user_meta($user->ID);
I feel I'm missing something in order to get this working correctly. Any ideas?