*** Used Zammad version: 2.5**
*** Operating system: Ubuntu 16.04**
*** Browser: Chrome**
I would like to log into my zammad account redirected from another site.
On my site working with CURL, I create a user on zammad with the same access data with which a user just created the account
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, ZAMMAD_LINK . “/api/v1/users”);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, “{"firstname":"”.$customer_info[‘firstname’].“","lastname":"”.$customer_info[‘lastname’].“","email":"”.$customer_info[‘email’].“","roles":["Customer"],"password":"”.$customer_info[‘password’].“"}”);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_USERPWD, ZAMMAD_ADMIN);$headers = array();
$headers = “Content-Type: application/json”;
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);$result = curl_exec($ch);
I have no problems in that part.
my problem is:
I would like to log into zammad’s account with a “login to zammad” button on the user’s account without logging in again in zammad site
i’m using MVC
PHP
// http://"example@hotmail.com":“123123”@localhost:3000/#login
or
// localhost:3000/#login?login=login&password=password$data[‘zammad_login’] = link to login in zammad account
HTML:
<a href='<?php echo $zammad_login; ?>' target="_blank"> <button> Login in my Zammad </button> </a>
how can I redirect the user on my site to zammad’s site without logging in again?
I’ve tried to send parameters to login link, but this doesn’t work!
// http://"example@hotmail.com":“123123”@localhost:3000/#login
or
// localhost:3000/#login?login=login&password=password$data[‘zammad_login’] = link to login in zammad account