Skip to:

Re: Generate username (+ blog url) from fullname



My latest attempts were here, for a plugin for a related problem that will hopefully also lead to a solution for username/blogurl.

I have to decide first how I am going to put firstname + lastname into the database; split the fullname value out to wp_usermeta or turn fullname into firstname and add another xprofile field for lastname.

Again, I’m not really a php programmer. I’m trying to puzzle it together from code examples and googled bits and pieces. I’ll need all the help I can get!

I can’t figure out how the fullname moves from the registration form to the database; which pieces of code are involved and how to “intercept” it to “do stuff” with it. That’s where I’m stuck at the moment.

“user profile meta” is put “in a session ready to store”. Is that an “array”? Anyway, that’s higher level php to me. No clue how to extract the fullname value from that.

// put the user profile meta in a session ready to store.
for ( $i = 0; $i < count($bp_xprofile_callback); $i++ ) {
$bp_user_signup_meta['field_' . $bp_xprofile_callback[$i]['field_id']] .= $bp_xprofile_callback[$i]['value'];

Skip to toolbar