Quantcast
Channel: DreamFactory Forum - Latest posts
Viewing all articles
Browse latest Browse all 5027

Get user ID when user register

$
0
0

Hello zerox12,
Thank you for help. You are right; I need to duplicate user information to another database. I've just almost given up and back using (only) laravel to create a web service until I saw your post. I've translated your code using PHP, and it works perfectly.

here is my code, hopefully, it could help someone out there who have the same problem.

<?php


$options = [];
$options['headers'] = [];
$options['headers']['X-DreamFactory-Api-Key'] = $platform['session']['api_key'];
$options['headers']['X-DreamFactory-Session-Token'] = $platform['session']['session_token'];
$options['headers']['Content-Type'] = 'application/json';

$api = $platform["api"];
$get = $api->get;
$url = 'user/session';
$result = $get($url);

$id = $result['content']['id'];
echo "id:".$id;


exit();

?>

Viewing all articles
Browse latest Browse all 5027

Trending Articles