function subuser_add_submit in Subuser 5
File
- ./
subuser.module, line 184
Code
function subuser_add_submit($form_id, $form_values) {
$roleID = variable_get("subuser_roleid", '');
$roles["{$roleID}"] = $roleID;
$mail = $form_values["mail"];
$pass = $form_values["pass"];
$merge_data = array(
'pass' => $pass,
'init' => $mail,
'roles' => $roles,
'status' => 1,
);
$account = user_save('', array_merge($form_values, $merge_data));
if ($account->uid) {
drupal_set_message(t("New subuser added"));
}
else {
drupal_set_message(t("Error adding subuser"));
}
return 'subuser/list';
}