Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

WordPress

Get the first_name and last_name from $user_id after a new user registers on a Wordpress.

Hi I am trying to create a plugin that takes data for newly registered users and uses it to populate and external api POST. I can't get first_name or last_name though from $user_id when using the action user_register.

I understand they are values store in the usermeta tables but even if I use get_user_meta($user_id)) I still can't seem to find them, they turn up empty.

Any ideas?

1 Answer

Have you gone through user registration to verify that First/Last name is required?