# Bringing over name from WordPress

**URL:** https://meta.discourse.org/t/bringing-over-name-from-wordpress/63638
**Category:** WordPress
**Created:** [May 30, 2017, 9:26pm UTC](https://meta.discourse.org/t/bringing-over-name-from-wordpress/63638 "2017-05-30T21:26:09Z")
**Posts on this page:** 1
**Showing post:** 15

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [June 8, 2017, 7:00pm UTC](https://meta.discourse.org/t/bringing-over-name-from-wordpress/63638/15 "2017-06-08T19:00:07Z")

</div>

There’s some information about how to do in this post, and the posts that follow it: [SSO Avatar Not Updating - #17 by simon](https://meta.discourse.org/t/sso-avatar-not-updating/25569/17)

Assuming that `get_user_meta($user->ID, 'mepr_custom_avatar', true)` returns the absolute URL to the avatar, this should work.

```php
add_filter( 'wpdc_sso_avatar_url', 'my_namespace_use_custom_avatar', 10, 2 );
function my_namespace_use_custom_avatar( $avatar_url, $user_id ) {
    if ( get_user_meta( $user_id, 'mepr_custom_avatar', true ) ) {
        $avatar_url = get_user_meta( $user_id, 'mepr_custom_avatar', true);
    }

    return $avatar_url;
}

```

If it’s not returning the absolute URL (starting with `http(s)://yourdomain.com`) you’ll need to append that to the URL so that Discourse can access it.

---

_[View the full topic](https://meta.discourse.org/t/bringing-over-name-from-wordpress/63638)._
