Until now, I was using the Rainloop API to login from external sites to the webmail.
From my last iMSCP update, the API always return an empty hash.
I can't get if I should send the password in other way, or Rainloop API is just not working on this version.
Code
- $_ENV['RAINLOOP_INCLUDE_AS_API'] = true;
- include '/var/www/imscp/gui/public/tools/rainloop/index.php';
- $email = $_POST['email'];
- $password = $_POST['password'];
- //
- // Get sso hash
- //
- // @param string $email
- // @param string $password
- // @return string
- //
- $ssoHash = \RainLoop\Api::GetUserSsoHash($email, $password);
- // redirect to webmail sso url
- \header('Location: http://HOST/rainloop/?sso&hash='.$ssoHash);