Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 512573

Create User with Existing User Meta

$
0
0

Replies: 0

Hi, I want to thank you for this wonderful plugin, it’s a great work i’ve ever seen so far.

Recently I’ve been figuring out how to customize the Registration Parameters. and i think I’m Lost, so i got to go to the support to get some advice or help.

I read the all the past question on this thread like regarding about my question and it seems that the question are far 2 years.

I’m trying to follow this instruction.

Open the json-api-user/controllers/User.php

Find this:

if($user_id) $msg = ‘Success’;

Replace with this:


if($user_id) {

$msg = 'Success';

$gender = $_REQUEST['gender'];
update_user_meta($user_id, 'gender', $gender);

}

You can add as many meta values as you want by copying the update_user_meta($user_id, ‘gender’, $gender);

line.

Here’s what we i need to achieve.

http://website.biz/api/user/register/?insecure=cool&&username=johndoe&email=marktbautista@gmail.com&last_name=Doe&first_name=John&user_pass=g3j00yts982&nonce=4528b130a8&display_name=JohnDoe&meta_key=member_id&meta_value=234524

Upon registering the user it should have parameters member_id.


Viewing all articles
Browse latest Browse all 512573

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>