function userpoints_install in User Points 7.2
Same name and namespace in other branches
- 5.3 userpoints.install \userpoints_install()
- 5 userpoints.install \userpoints_install()
- 5.2 userpoints.install \userpoints_install()
- 6 userpoints.install \userpoints_install()
Implements hook_install().
File
- ./
userpoints.install, line 258 - Install time hook userpoints module.
Code
function userpoints_install() {
// Create the default userpoints bundle that is defined in
// userpoints_entity_info().
$bundle_info = array(
'name' => 'userpoints',
'label' => st('Default'),
'status' => 0x1,
'module' => 'userpoints',
);
try {
$bundle = new UserpointsTransactionType($bundle_info);
$bundle
->save();
variable_set('userpoints_default_bundle', 'userpoints');
} catch (Exception $e) {
watchdog_exception('userpoints', $e, 'Failed to create default bundle.', array(), WATCHDOG_CRITICAL);
}
}