You are here

function bakery_taste_stroopwafel_cookie in Bakery Single Sign-On System 7.2

Same name and namespace in other branches
  1. 6.2 bakery.module \bakery_taste_stroopwafel_cookie()
  2. 6 bakery.module \bakery_taste_stroopwafel_cookie()

Validate update request.

1 string reference to 'bakery_taste_stroopwafel_cookie'
bakery_menu in ./bakery.module
Implements hook_menu().

File

./bakery.module, line 1284
Module file for the Bakery.

Code

function bakery_taste_stroopwafel_cookie() {
  $type = 'stroopwafel';
  if (empty($_POST[$type])) {
    return FALSE;
  }
  if (($payload = bakery_validate_data($_POST[$type], $type)) === FALSE) {
    return FALSE;
  }
  $_SESSION['bakery'] = unserialize($payload['data']);
  $_SESSION['bakery']['uid'] = $payload['uid'];
  $_SESSION['bakery']['category'] = $payload['category'];
  return TRUE;
}