function apply_for_role_update_7002 in Apply for role 7.2
Same name and namespace in other branches
- 7 apply_for_role.install \apply_for_role_update_7002()
Add a 'message' field for applicants to justify the role request.
File
- ./
apply_for_role.install, line 223 - Installs the Apply for Role (AFR) module.
Code
function apply_for_role_update_7002(&$sandbox) {
$message_field = array(
'type' => 'text',
'size' => 'big',
'description' => 'The message written by the role applicant.',
);
// Check that the field hasn't been created in an aborted run of this
// update.
if (!db_field_exists('users_roles_apply', 'message')) {
// Add a new field for the fid.
db_add_field('users_roles_apply', 'message', $message_field);
}
}