Adding email address to users in local db (patch inside)
-
Hey out there,
my setup does need the ability to send automatically emails to users in local database. Because this is not included by default, I did a little bit of "coding"… Here are the changes:
/usr/local/www/system_usermanager.php:
if (isset($id) && $a_user[$id]) { $pconfig['usernamefld'] = $a_user[$id]['name']; $pconfig['descr'] = $a_user[$id]['descr']; $pconfig['expires'] = $a_user[$id]['expires']; $pconfig['groups'] = local_user_get_groups($a_user[$id]); $pconfig['utype'] = $a_user[$id]['scope']; $pconfig['uid'] = $a_user[$id]['uid']; $pconfig['authorizedkeys'] = base64_decode($a_user[$id]['authorizedkeys']); $pconfig['priv'] = $a_user[$id]['priv']; $pconfig['ipsecpsk'] = $a_user[$id]['ipsecpsk']; + $pconfig['email'] = $a_user[$id]['email']; $pconfig['disabled'] = isset($a_user[$id]['disabled']); } . . . $userent['name'] = $_POST['usernamefld']; $userent['descr'] = $_POST['descr']; $userent['expires'] = $_POST['expires']; $userent['authorizedkeys'] = base64_encode($_POST['authorizedkeys']); $userent['ipsecpsk'] = $_POST['ipsecpsk']; + $userent['email'] = $_POST['email']; . . . + + + + /> + + + +
I've also attached the complete file (rename .txt to .php; Board does not allow uploading php files) . The "patch" doesn't modify current functions, just adding a new input field…
system_usermanager.txt