Skip to content
Read For Learn
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP

Remove username in emails or swap username for email

I think you just need to take the md5() out of this line:

$result['user_name'] = md5($result['user_email']);

I’m not that familiar with buddy press but if empty($result['errors']->errors['user_email']) being true means a user was succesfully registered I’d use something like

wp_update_user( array( 'ID' => $user_id, 'name' => $result['user_email'] ) );

Related Posts:

  1. How build a custom login/register form with error handling?
  2. WordPress shows registration link for non logged users
  3. Is it necessary to sanitize wp_set_password user input?
  4. How to give new users two specific user role options upon WordPress user registration
  5. User management system similar to wordpress one?
  6. Change homepage content if user is logged in – BuddyPress
  7. Issues adding Recaptcha v3 to WordPress Registration
  8. Newbie question. Login/Registration. New PHP page
  9. How do I do so that people can register on my wordpress site?
  10. Log in / Log Out Custom Button
  11. WordPress Stripping Colons?
  12. Should `wp_login` be used since it’s deprecated?
  13. How to redirect users based on role and content of redirect_to?
  14. Change CSS based on is_user_logged_in
  15. How to display login form anywhere, when user isn’t logged in, without redirecting?
  16. How can I open up my administrative panel to everyone?
  17. User register hook is not working in woocomerce register form
  18. Password minimum length in personal subscription [closed]
  19. Run a code only on theme activation only during first activation
  20. Buddypress update user avatar image via REST
  21. Fatal error: Call to undefined function register_new_user()
  22. How Can I Edit the Registration Code?
  23. How do you create two separate Register pages?
  24. How can I add a new row in a separate database when someone registers via WordPress?
  25. After adding my website to a new server, I keep getting a unexpected end of file error, but the file is identitcal to it’s original source
  26. One account with multiple logins
  27. Lost in trying to create user database system
  28. Custom Registration username_exists / email_exists
  29. Shortcode to log user into current URL
  30. PHP getting error when trying to access WP-Admin Dashboard
  31. I installed WordPress locally now how do I login?
  32. If user is logged in not working
  33. Custom User Registration script only allowing usernames with 16 characters
  34. Why BuddyPress fields not saving?
  35. How to do something when user profile rendereing?
  36. implementing a jQuery “click to expand” link in WordPress [closed]
  37. is user member of a group, show them categories [closed]
  38. Show login greeting above sub-menu links?
  39. Wp favorites posts by specific category? [closed]
  40. Display multi-select box choices in a bullet list [closed]
  41. is_user_logged_in returning nothing on custom page
  42. Customize Buddypress adminbar [closed]
  43. Help with accessing wp-admin page and resolving error messages
  44. Prevent Buddypress Rewrite Rules on Non-Buddypress pages/posts
  45. Removing “There is no account with that username or email address.” error message in “/wp-login.php?action=lostpassword”
  46. Can’t log in to WordPress wp-admin after adding code to functions.php
  47. Check if user had autologin & if so, logout
  48. Admin Panel 404 Error after login
  49. copy fields value to another field
  50. PHP warning – Use of undefined constant ‘FORCE_SSL_LOGIN’ ‘FORCE_SSL_ADMIN’ on wp-config.php
  51. How to block specific user id in custom login form?
  52. Log out without confirmation request (nonce)
  53. Custom User registration system
  54. Having trouble creating two shortcodes, one for logged in user and one for visitors
  55. Call WP Rest-Api to GET /users/me returned NOTHING in console
  56. Uploading/integrating custom user registration page
  57. Restrict wordpress access to logged users only
  58. Infinite loop when logging out using custom login form
  59. Menu not updating for logged in users after redirect
  60. Including user data in “new user notification email”
  61. how to use auth_redirect() redirect visitor to login page if they are not login when they click account and order page?
  62. Display specific page if user signed in
  63. Change Login or Logout text based on status
  64. Refresh page after login with litespeed cache
  65. Help hooking into user_register
  66. How to auto-generate random numbers in username?
  67. Redirect after login depending on the URL
  68. How do I visualize the author’s post from the front end?
  69. Need help with AJAX login to call php in functions.php to handle redirects based on user cap (role)
  70. Redirecting the lost password page request when using a custon login page
  71. How do I send a POST request with params with WordPress REST API
  72. wp-login.php?redirect_to=https problem
  73. is_user_logged_in() not working in homepage
  74. Attaching an upload to a user
  75. Change username link in admin bar
  76. Creating a custom register form
  77. Check if a user is logged into my WordPress site which is on a different server
  78. how to get buddy press messages based on thready_id?
  79. Adding a sidebar to wp-login.php
  80. Where is the php file of single member profile view (BuddyPress)
  81. Create a dynamic buddupress tab
  82. List users in a dropdown for login
  83. Registration form not registering First and Last name
  84. Not logged in when using http
  85. add bootstrap modal after login in wordpress
  86. White screen after login attempt
  87. Editing a WordPress plugin to add my own functionality
  88. Get string from array and start loop [closed]
  89. how to register a second page-template
  90. 2 small questions: How to redirect to a created page & show that pages title in wp, bp
  91. I want to remove the register/login WordPress top bar from my website
  92. Redirect users not logged in to the standard login page (and back) from some posts and pages
  93. How to replace wp-admin login page to another location?
  94. Null value given when confirming email’s
  95. Check user last login date
  96. WCFM Custom form
  97. Prevent users from display default wordpress login form
  98. login redirect based on user role not work as expected
  99. rest_cannot_create_user – Sorry, you are not allowed to create new users. CURL WORDPRESS REST API
  100. How to change wp-admin and wp-login urls
Categories PHP Tags buddypress, login, php, user-registration
Custom field value based on other custom field values
get_post_field – Title without paragraph

Recommended Hostings

Cloudways: Realize Your Website's Potential With Flexible & Affordable Hosting. 24/7/365 Support, Managed Security, Automated Backups, and 24/7 Real-time Monitoring.

FastComet: Fast SSD Hosting, Free Migration, Hack-Free Security, 24/7 Super Fast Support, 45 Day Money Back Guarantee.

Recent Added Topics

  • Bug in translation system: load_theme_textdomain() returns true, files are available and accessible but the language defaults to english
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • Get the name of the template/*html file used
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
  • How to display the description of a custom post type in the dashboard?
  • Critical error on image display
  • Copying WP data and files into new install?
  • How to determine the DirectAdmin WordPress backup date?
  • How to get list of ALL tables in the database?
© 2026 Read For Learn
  • Database
    • Oracle
    • SQL
  • algorithm
  • asp.net
  • assembly
  • binary
  • c#
  • Git
  • hex
  • HTML
  • iOS
  • language angnostic
  • math
  • matlab
  • Tips & Trick
  • Tools
  • windows
  • C
  • C++
  • Java
  • javascript
  • Python
  • R
  • Java Script
  • jQuery
  • PHP
  • WordPress