| Line 124... |
Line 124... |
| 124 |
$sth->execute ($F->{email}, $F->{password}, $F->{derby_name}, $F->{real_name}, $F->{pronouns}, $F->{tshirt}, $F->{phone}, $F->{timeformat}, 0, $F->{department});
|
124 |
$sth->execute ($F->{email}, $F->{password}, $F->{derby_name}, $F->{real_name}, $F->{pronouns}, $F->{tshirt}, $F->{phone}, $F->{timeformat}, 0, $F->{department});
|
| Line 125... |
Line 125... |
| 125 |
|
125 |
|
| 126 |
$sth = $dbh->prepare ("select RCid, activation from official where email = ?");
|
126 |
$sth = $dbh->prepare ("select RCid, activation from official where email = ?");
|
| 127 |
$sth->execute ($F->{email});
|
127 |
$sth->execute ($F->{email});
|
| - |
|
128 |
($F->{RCid}, $F->{activation}) = $sth->fetchrow_array;
|
| 128 |
($F->{RCid}, $F->{activation}) = $sth->fetchrow_array;
|
129 |
$dbh->do ("replace into RCid_ticket_link select official.RCid, v_ticket.id from official join v_ticket on official.email = v_ticket.email and official.real_name = v_ticket.full_name where official.RCid = ?", undef, $F->{RCid});
|
| 129 |
logit ($F->{RCid}, "New User Registration");
|
130 |
logit ($F->{RCid}, "New User Registration");
|
| 130 |
sendNewUserEMail ("New User", $F);
|
131 |
sendNewUserEMail ("New User", $F);
|
| 131 |
$cookie_string = authenticate (1);
|
132 |
$cookie_string = authenticate (1);
|
| 132 |
}
|
133 |
}
|
| Line 171... |
Line 172... |
| 171 |
} else {
|
172 |
} else {
|
| 172 |
logit ($F->{RCid}, "Updated User Details");
|
173 |
logit ($F->{RCid}, "Updated User Details");
|
| 173 |
}
|
174 |
}
|
| 174 |
} elsif ($AL > 1) { # A lead or higher is updating someone else's record
|
175 |
} elsif ($AL > 1) { # A lead or higher is updating someone else's record
|
| Line 175... |
Line 176... |
| 175 |
|
176 |
|
| 176 |
use List::Util qw/sum/;
|
177 |
# use List::Util qw/sum/;
|
| 177 |
# if (sum (values %{ convertDepartments ($F->{department}) }) > 0 and $F->{access} == 0) {
|
178 |
# if (sum (values %{ convertDepartments ($F->{department}) }) > 0 and $F->{access} == 0) {
|
| 178 |
if ($F->{department} and sum (values %{ convertDepartments ($F->{department}) }) > 0 and $F->{access} == 1) {
|
179 |
# if ($F->{department} and sum (values %{ convertDepartments ($F->{department}) }) > 0 and $F->{access} == 1) {
|
| 179 |
# activating a user for the first time...
|
180 |
# activating a user for the first time...
|
| 180 |
$F->{access} = 1;
|
181 |
# $F->{access} = 1;
|
| 181 |
# sendNewUserEMail ("Activate", $F);
|
182 |
# sendNewUserEMail ("Activate", $F);
|
| Line 182... |
Line 183... |
| 182 |
}
|
183 |
# }
|
| 183 |
|
184 |
|
| 184 |
if ($FORM->{password}) {
|
185 |
if ($FORM->{password}) {
|
| 185 |
# my $sth = $dbh->prepare ("replace into official (RCid, email, password, derby_name, real_name, phone, level, type, access, department, clinic_pass) values (?, ?, password(?), ?, ?, ?, ?, ?, ?, ?, ?)");
|
186 |
# my $sth = $dbh->prepare ("replace into official (RCid, email, password, derby_name, real_name, phone, level, type, access, department, clinic_pass) values (?, ?, password(?), ?, ?, ?, ?, ?, ?, ?, ?)");
|