ePascalC / bbp-API

An API for bbPress
15 stars 6 forks source link

Validate POST parameters #11

Open ePascalC opened 7 years ago

ePascalC commented 7 years ago

In POST calls make sure email is a real email forum_id a real forum_id

ePascalC commented 7 years ago

$myuser = get_user_by( "email", $data['email'] );

If the email does not return a user, do not try to insert but provide an error message.