function hook_bakery_receive in Bakery Single Sign-On System 7.4
Same name and namespace in other branches
- 6.2 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_profile_eat_stroopwafel_cookie in ./
bakery_profile.module - Menu callback, invoked on the slave
- bakery_profile_request_account in ./
bakery_profile.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_update('example_table')
->fields(array(
'example_field' => $cookie['example_field'],
))
->execute();
}
}