Fixup all other uses of user_create

This commit is contained in:
dave 2009-02-08 07:51:03 +00:00
parent 6a1de0f2f3
commit cb39440d16
5 changed files with 11 additions and 10 deletions

View File

@ -32,10 +32,9 @@ if($_POST['users_uid'])
$uid = intval($_POST['users_uid']);
/* Some actions we want to redirect to the personal editor, so deal with those first */
if($_POST['add_member'])
{
$u = user_create('committee');
list($u['firstname'], $u['lastname']) = split(' ', $_POST['add_member']);
if($_POST['add_member']) {
$email = $_POST['add_member'];
$u = user_create('committee', $email);
user_save($u);
header("location: {$config['SFIABDIRECTORY']}/user_personal.php?edit={$u['id']}");
exit;
@ -244,7 +243,7 @@ if($_POST['add_member_to_committees_id'])
echo "<h4>".i18n("Add Committee Member")."</h4>\n";
echo "<form method=\"post\" action=\"committees.php\">\n";
echo "<table>\n";
echo "<tr><td>".i18n("Member Name").": </td><td>";
echo "<tr><td>".i18n("Member Email").": </td><td>";
echo "<input type=\"text\" size=\"15\" name=\"add_member\" />\n";
echo "</td>\n";
echo " <td><input type=\"submit\" value=\"".i18n("Add")."\" /></td></tr>\n";

View File

@ -63,7 +63,7 @@
$p = ($_POST['primary']=='yes')?'yes':'no';
if($_POST['save']=="add") {
$u=user_create("sponsor");
$u=user_create("sponsor", $_POST['email']);
$id=$u['id'];
}
else {

View File

@ -141,7 +141,7 @@ if($_POST['action']=="save")
echo "<b>Done!</b><br />";
echo "Creating superuser account...";
$u = user_create('committee');
$u = user_create('committee',$_POST['email']);
if($_POST['firstname'] && $_POST['lastname']) {
$u['firstname']=mysql_escape_string(stripslashes($_POST['firstname']));
$u['lastname']=mysql_escape_string(stripslashes($_POST['lastname']));

View File

@ -184,7 +184,9 @@
switch($action) {
case 'notexist': /* Create the user */
$u = user_create($type);
$u = user_create($type, $email);
$u['email'] = $email;
user_save($u);
email_send("{$type}_new_invite",$u['email'],
array("FAIRNAME"=>$config['fairname']),
array("FAIRNAME"=>$config['fairname'],
@ -195,7 +197,7 @@
break;
case 'norole': /* Add role to the existing user */
user_create($type, $u);
user_create($type, $u['username'], $u);
email_send("{$type}_add_invite",$u['email'],
array("FAIRNAME"=>$config['fairname']),
array("FAIRNAME"=>$config['fairname']));

View File

@ -137,7 +137,7 @@
* ensuring a student doesn't try to also
* register as a judge */
$u = user_load($_SESSION['users_id']);
$u = user_create($type, $u);
$u = user_create($type, $u['username'], $u);
$_SESSION['users_type'] = $type;
message_push(notice(i18n("Login to finish adding the new role to your account")));