You are here

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

Create cookie used during sub-site registration.

Parameters

string Account name:

array Data to store in cookie.:

string URL of site starting redirection.: FQDN and must end in forward slash (/).

File

./bakery.inc, line 118

Class

Bakery

Code

public function setSubCookie($name, $data, $start_url) {
  $cookie = array();
  $type = $this->subCookieName;
  $cookie['type'] = $type;
  $cookie['name'] = $name;
  $cookie['data'] = $data;
  $cookie['master'] = $this->isMaster;
  $cookie['slave'] = $start_url;
  $cookie['timestamp'] = $_SERVER['REQUEST_TIME'];
  $data = $this
    ->bakeData($cookie);
  $this
    ->setCookie($type, $data);
}