Title: Missing Data User ID
Last modified: August 21, 2016

---

# Missing Data User ID

 *  [jaromano](https://wordpress.org/support/users/jaromano/)
 * (@jaromano)
 * [12 years ago](https://wordpress.org/support/topic/missing-data-user-id/)
 * hi,
 * im having problem in getting the facebook username.
 * its not displaying in user prefix.
 * what could be the cause?
 * [https://wordpress.org/plugins/nextend-facebook-connect/](https://wordpress.org/plugins/nextend-facebook-connect/)

Viewing 15 replies - 1 through 15 (of 17 total)

1 [2](https://wordpress.org/support/topic/missing-data-user-id/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/missing-data-user-id/page/2/?output_format=md)

 *  [csula](https://wordpress.org/support/users/csula/)
 * (@csula)
 * [12 years ago](https://wordpress.org/support/topic/missing-data-user-id/#post-4909785)
 * same problem here. maybe it’s the 3.9.1 WP?
 *  [KWMSources](https://wordpress.org/support/users/kwmsources/)
 * (@kwmsources)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/missing-data-user-id/#post-4909867)
 * Same problem here.
 *  [yeahiknowiam](https://wordpress.org/support/users/yeahiknowiam/)
 * (@yeahiknowiam)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/missing-data-user-id/#post-4909868)
 * Same problem here. Here’s the email that’s generated:
 * New user registration on your site:
    Username: Facebook –
 *  [Herman Alexander](https://wordpress.org/support/users/hscottda/)
 * (@hscottda)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/missing-data-user-id/#post-4909872)
 * Same issue here! Anyone figured it out?
 *  [keepingitodd](https://wordpress.org/support/users/keepingitodd/)
 * (@keepingitodd)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/missing-data-user-id/#post-4909874)
 * I just installed this plugin and I’m getting the same thing using 3.9.1. All 
   it registers for the username is the prefix.
 *  [Ali Qureshi](https://wordpress.org/support/users/parorrey/)
 * (@parorrey)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/missing-data-user-id/#post-4909875)
 * Facebook has deprecated the ‘username’ availability in API 2.0 starting May 2014,
   this is why plugin has stopped working because it can’t register the user in 
   WordPress correctly due to non-availability of username.
 * This plugin needs update to correct this issue. username now should be formed
   using the first + last name and (then possibly digit for next available username)
 *  Thread Starter [jaromano](https://wordpress.org/support/users/jaromano/)
 * (@jaromano)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/missing-data-user-id/#post-4909876)
 * thanks for that info [@ali](https://wordpress.org/support/users/ali/) Qureshi.
 * for the rest you need to modify the plugin file. change the username to name 
   and do some str filtering for special character. it will use the display name
   of the user as the username.
 *  [bostondv](https://wordpress.org/support/users/bostondv/)
 * (@bostondv)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/missing-data-user-id/#post-4909877)
 * Also had this issue… You can modify line 168 of nextend-facebook-connect.php 
   to something like this to fix it:
 * `$sanitized_user_login = sanitize_user($new_fb_settings['fb_user_prefix'] . preg_replace('/[
   ^A-Za-z0-9\-]/', '', strtolower($user_profile['first_name']) . strtolower($user_profile['
   last_name'])));`
 *  [mherb204](https://wordpress.org/support/users/mherb204/)
 * (@mherb204)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/missing-data-user-id/#post-4909880)
 * > Also had this issue… You can modify line 168 of nextend-facebook-connect.php
   > to something like this to fix it:
   > $sanitized_user_login = sanitize_user($new_fb_settings[‘fb_user_prefix’] . 
   > preg_replace(‘/[^A-Za-z0-9\-]/’, ”, strtolower($user_profile[‘first_name’]).
   > strtolower($user_profile[‘last_name’])));
 * This works great however, it leaves no space inbetween the first and last name.
   Is there a way to put a space, dot or dash?
 *  [anthonyabraira](https://wordpress.org/support/users/anthonyabraira/)
 * (@anthonyabraira)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/missing-data-user-id/#post-4909887)
 * That worked great. Thanks for that, I was sweating bullets yesterday night under
   deadline.
 *  [Ali Qureshi](https://wordpress.org/support/users/parorrey/)
 * (@parorrey)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/missing-data-user-id/#post-4909888)
 * > Also had this issue… You can modify line 168 of nextend-facebook-connect.php
   > to something like this to fix it:
   > $sanitized_user_login = sanitize_user($new_fb_settings[‘fb_user_prefix’] . 
   > preg_replace(‘/[^A-Za-z0-9\-]/’, ”, strtolower($user_profile[‘first_name’]).
   > strtolower($user_profile[‘last_name’])));
   > This works great however, it leaves no space inbetween the first and last name.
   > Is there a way to put a space, dot or dash?
 * never put a dot rather use underscore, it does not work with BP profiles urls
   with dot.
 * for _, use this:
    $sanitized_user_login = sanitize_user($new_fb_settings[‘fb_user_prefix’].
   preg_replace(‘/[^A-Za-z0-9\-]/’, ”, strtolower($user_profile[‘first_name’]) .‘_’.
   strtolower($user_profile[‘last_name’])));
 *  [anthonyabraira](https://wordpress.org/support/users/anthonyabraira/)
 * (@anthonyabraira)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/missing-data-user-id/#post-4909890)
 * Would be preferable if we could somehow save the Facebook user id. To generate
   articles with author profile pics included, its downright useless to have some
   auto generated
 * **[first name][last name][some number]**
 * In its stead, it would be really great if they could save the USER ID somewhere.
   Does anyone know if there are plans for this? Or am I truly missing the “easy
   street” solution for getting a contributor (who registered using Facebook Connect)
   current profile pic.
 * Before I was using AWD Facebook plugin which did this and was able to use something
   like this for displaying the profile pic. Quite useless in this current NextEnd
   plug setup.
 *     ```
       <?php $fb_base = 'http:\/\/facebook.com\/';
       		$og_base = 'https:\/\/graph.facebook.com\/';
       		echo '<div class="ctr">';
       		echo '<div class="ilb author_box" style="background:url('. esc_url_raw( $og_base ) . $all_meta_for_user[fb_uid][0] . '/picture?type=large' .'); ">';
       		// echo '<a target="_blank" href="' . esc_url_raw( $fb_base ) . $all_meta_for_user[fb_uid][0] . '">';
       		// echo '<img src="' . esc_url_raw( $og_base ) . $all_meta_for_user[fb_uid][0] . '/picture?type=large" /></a>'; //?type=large
       		echo '</div>';
       		echo '</div>';
       		?>
       ```
   
 *  [oldmankit](https://wordpress.org/support/users/oldmankit/)
 * (@oldmankit)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/missing-data-user-id/#post-4909891)
 * > never put a dot rather use underscore, it does not work with BP profiles urls
   > with dot.
   > for _, use this:
   >  $sanitized_user_login = sanitize_user($new_fb_settings[‘fb_user_prefix’].
   > preg_replace(‘/[^A-Za-z0-9\-]/’, ”, strtolower($user_profile[‘first_name’]).‘_’.
   > strtolower($user_profile[‘last_name’])));
 * I used this and still don’t get an underscore. I can’t guess why.
 * The plugin author hasn’t replied on this thread (at least, I can’t see any replies),
   which was started three months ago, and it’s quite an important issue. Is the
   plugin still being updated/supported?
 * Anyway, many thanks to the people here who have contributed to a partial fix.
 *  [Gilligan](https://wordpress.org/support/users/playgod/)
 * (@playgod)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/missing-data-user-id/#post-4909892)
 * thanks for this quick fix. i just set this up today as part of a theme, and wondered
   why prepended username was not working as expected.
 *  [gonzaloibarra](https://wordpress.org/support/users/gonzaloibarra/)
 * (@gonzaloibarra)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/missing-data-user-id/#post-4909894)
 * The code works great! Thank you for sharing the solution.

Viewing 15 replies - 1 through 15 (of 17 total)

1 [2](https://wordpress.org/support/topic/missing-data-user-id/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/missing-data-user-id/page/2/?output_format=md)

The topic ‘Missing Data User ID’ is closed to new replies.

 * ![](https://ps.w.org/nextend-facebook-connect/assets/icon.svg?rev=3336394)
 * [Nextend Social Login and Register](https://wordpress.org/plugins/nextend-facebook-connect/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/nextend-facebook-connect/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/nextend-facebook-connect/)
 * [Active Topics](https://wordpress.org/support/plugin/nextend-facebook-connect/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/nextend-facebook-connect/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/nextend-facebook-connect/reviews/)

 * 17 replies
 * 14 participants
 * Last reply from: [druckpiloten](https://wordpress.org/support/users/druckpiloten/)
 * Last activity: [11 years, 6 months ago](https://wordpress.org/support/topic/missing-data-user-id/page/2/#post-4909898)
 * Status: not resolved