Your registration request has been received. An e-mail has been sent to ';
- print $person['email'];
- print ' with further instructions.
';
+ $email=$person['email'];
+ $text="Your registration request has been received. An e-mail has been sent to $email with further instructions.";
+ print html_div($text,"messages status");
}
}
+////////////////////
+if (!empty($person) && check_form ($person))
+ register_person($person);
+
$PLC_NAME = htmlspecialchars(PLC_NAME);
// E-mail address verified, go ahead and notify the PI (and possibly
@@ -157,36 +188,31 @@ $PLC_NAME = htmlspecialchars(PLC_NAME);
if (!empty($_REQUEST['id']) && !empty($_REQUEST['key'])) {
$person_id = intval($_REQUEST['id']);
if ($adm->VerifyPerson($person_id, $_REQUEST['key']) != 1) {
- print '
' . $adm->error() . '.
';
+ plc_error($adm->error());
} else {
$persons = $adm->GetPersons(array($person_id));
$person = $persons[0];
// Remove the password field from the form so that it is not
// highlighted as missing.
- unset($form['password']);
+ unset($person_form['password']);
- print '
';
- print 'Your e-mail address has been verified. ';
- print 'The PI(s) at your site have been notified of your account registration ';
+ $messages = array();
+ $messages []= 'Your e-mail address has been verified. ';
+ $messages []= 'The PI(s) at your site have been notified of your account registration ';
- if (in_array('pi', $person['roles'])) {
- $support = PLC_MAIL_SUPPORT_ADDRESS;
- print " and should contact $PLC_NAME Support <$support>. ";
- print " $PLC_NAME Support will enable your account if authorized by your PI(s).";
+ if (! in_array('pi', $person['roles'])) {
+ $messages []= 'They are responsible for enabling your account.';
} else {
- print ' and are responsible for enabling your account.';
+ $support = PLC_MAIL_SUPPORT_ADDRESS;
+ $messages []= "They should contact $PLC_NAME Support <$support>. ";
+ $messages []= "$PLC_NAME Support will enable your account once authorized by your PI(s).";
}
- print '