diff --git a/user_personal.php b/user_personal.php index c3ded90..cfd23cf 100644 --- a/user_personal.php +++ b/user_personal.php @@ -64,7 +64,6 @@ /* If the editer is super, let them see/edit/save the user/pass */ $fields[] = 'username'; $fields[] = 'password'; - $required[] = 'username'; } if($_POST['action']=="save") @@ -74,6 +73,10 @@ $u[$f] = mysql_escape_string(stripslashes($_POST[$f])); } + if(!array_key_exists('username', $u) || $u['username'] == '') { + $u['username'] = $u['email']; + } + if(in_array('committee', $u['types'])) { /* Trying to save a committee member eh? Well, we established above * that we're allowed to be here, so go ahead and save it */ @@ -152,12 +155,14 @@ if(count($u['types']) > 1) { echo notice(i18n('This user has multiple roles, the fields shown below are a combination of every role. Some may not apply to some roles. This user has the following roles:').' '.$roles); } -function item($user, $text, $fname) +function item($user, $text, $fname, $subtext='') { global $fields, $required; if(in_array($fname, $fields)) { - echo '