You are here

public function Bakery::setSsoCookie in Bakery Single Sign-On System 7.3

Create SSO cookie for account.

Parameters

array $params Array of account parameters. Must contain.: 'name' 'mail'

File

./bakery.inc, line 72

Class

Bakery

Code

public function setSsoCookie($params) {
  $cookie = array();
  $type = $this->SsoCookieName;
  $cookie['type'] = $type;
  $cookie['name'] = $params['name'];
  $cookie['mail'] = $params['mail'];
  $cookie['init'] = $params['init'];
  $cookie['uid'] = $params['uid'];
  $cookie['data'] = isset($params['data']) ? $params['data'] : array();
  $cookie['master'] = $this->isMaster;
  $cookie['timestamp'] = $_SERVER['REQUEST_TIME'];
  $data = $this
    ->bakeData($cookie);
  $this
    ->setCookie($type, $data);
}