function hook_bakery_receive in Bakery Single Sign-On System 6.2
Same name and namespace in other branches
- 7.4 bakery.api.php \hook_bakery_receive()
- 7.2 bakery.api.php \hook_bakery_receive()
Bakery data receive hook invoked on response from data sync from master.
Invoked on subsites after requesting account data from master for account creation. Also invoked on subsites during account data sync from master.
Note, callers are responsible for data validation.
Parameters
object $account: User account object.
array $cookie: Data sent from the master. Custom data sent by master's hook_bakery_transmit() will be available as top-level elements.
2 invocations of hook_bakery_receive()
- bakery_eat_stroopwafel_cookie in ./
bakery.module - Menu callback, invoked on the slave
- bakery_request_account in ./
bakery.module - Request account information from master to create account locally.
File
- ./
bakery.api.php, line 53 - This file contains no working PHP code; it exists to provide additional documentation for doxygen as well as to document hooks in the standard Drupal manner.
Code
function hook_bakery_receive($account, $cookie) {
if (!empty($cookie['example_field'])) {
db_query("UPDATE {example_table} SET example_field = '%s'", array(
'%s' => $cookie['example_field'],
));
}
}