get_user_meta returns value twice

279 views Asked by At

I have a very simple function that grabs a user's uploaded avatar from usermeta in order to resize it, however, the value is returned twice? I can't for the life of me understand why.

$img =  get_user_meta($user_id,'user_avatar',true);

print_r ("<pre>");
print_r ($img);
print_r ("</pre>");

returns:

http://mysite.com/wp-content/uploads/2013/08/iStock_000004361729Small.jpg
http://mysite.com/wp-content/uploads/2013/08/iStock_000004361729Small.jpg

Why this happens and how to fix it?

0

There are 0 answers