function shoutbox_user_save in Shoutbox 7
Same name and namespace in other branches
- 6.2 shoutbox_user/shoutbox_user.module \shoutbox_user_save()
- 7.2 shoutbox_user/shoutbox_user.module \shoutbox_user_save()
Save a shout for a given user
Parameters
$shout: A shout object
$user: The user, or uid, whom the shout is directed towards
1 call to shoutbox_user_save()
- shoutbox_user_shoutbox in shoutbox_user/
shoutbox_user.module - Implements hook_shoutbox().
File
- shoutbox_user/
shoutbox_user.module, line 149
Code
function shoutbox_user_save($shout, $user) {
$record = new stdClass();
$record->shout_id = $shout->shout_id;
$record->uid = is_object($user) ? $user->uid : $user;
drupal_write_record('shoutbox_user', $record);
}