From cb39440d1666a611c79f89e08157ea9352a450bc Mon Sep 17 00:00:00 2001 From: dave Date: Sun, 8 Feb 2009 07:51:03 +0000 Subject: [PATCH] Fixup all other uses of user_create --- admin/committees.php | 9 ++++----- admin/sponsor_contacts.php | 2 +- install3.php | 2 +- user_invite.php | 6 ++++-- user_new.php | 2 +- 5 files changed, 11 insertions(+), 10 deletions(-) diff --git a/admin/committees.php b/admin/committees.php index 09013ae..7c93ed3 100644 --- a/admin/committees.php +++ b/admin/committees.php @@ -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 "

".i18n("Add Committee Member")."

\n"; echo "
\n"; echo "\n"; - echo "\n"; echo " \n"; diff --git a/admin/sponsor_contacts.php b/admin/sponsor_contacts.php index d6b9a73..3423305 100644 --- a/admin/sponsor_contacts.php +++ b/admin/sponsor_contacts.php @@ -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 { diff --git a/install3.php b/install3.php index 6856283..179c918 100644 --- a/install3.php +++ b/install3.php @@ -141,7 +141,7 @@ if($_POST['action']=="save") echo "Done!
"; 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'])); diff --git a/user_invite.php b/user_invite.php index 0c09cf5..77eb04f 100644 --- a/user_invite.php +++ b/user_invite.php @@ -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'])); diff --git a/user_new.php b/user_new.php index 61300c2..6a6c7d2 100644 --- a/user_new.php +++ b/user_new.php @@ -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")));
".i18n("Member Name").": "; + echo "
".i18n("Member Email").": "; echo "\n"; echo "