Permalink
Browse files

Merge pull request #272 from MG-RAST/master

Merging changes from master back to develop.
  • Loading branch information...
2 parents 63ee592 + e8c9b9b commit e0c7abbb5bf1f185f35ac5fd1488757101ae4625 @jaredbischof jaredbischof committed Mar 28, 2013
Showing with 3 additions and 3 deletions.
  1. +2 −2 src/WebApplication/WebComponent/Register.pm
  2. +1 −1 src/WebApplication/WebPage/AccountManagement.pm
@@ -212,7 +212,7 @@ sub perform_registration {
}
# check if email address is valid
- unless ($cgi->param('email') =~ /[\d\w\.-]+\@[\d\w\.-]+\.[\w+]/) {
+ unless ($cgi->param('email') =~ /^[\d\w\.-\']+\@[\d\w\.-]+\.[\w+]$/) {
$application->add_message('warning', 'You must enter a valid eMail address.');
return 0;
}
@@ -224,7 +224,7 @@ sub perform_registration {
}
# check if the login is valid
- unless ($cgi->param('login') =~ /[\d\w]+/) {
+ unless ($cgi->param('login') =~ /^[\d\w]+$/) {
$application->add_message('warning', 'Login may only consist of alphanumeric characters.');
return 0;
}
@@ -170,7 +170,7 @@ sub output {
my $i=0;
foreach my $request (@$user_requests) {
my $request_text = $request->{user}->firstname() . " " . $request->{user}->lastname() . " is requesting access to the " . $request->{type} . " " . $request->{group}->name();
- $html .= "<tr><td>$request_text<input type='hidden' name='group_$i' value='" . $request->{group}->name() . "'><input type='hidden' name='type_$i' value='" . $request->{type} . "'><input type='hidden' name='login_$i' value='".$request->{user}->login()."'></td><td><input type='Radio' name='handling_$i' value='accept'></td><td><input type='radio' name='handling_$i' value='reject'></td><td><input type='radio' name='handling_$i' value='defer' checked='checked'></td><td><input type='text' name='reason_$i' value='-'></td></tr>";
+ $html .= "<tr><td>$request_text<input type='hidden' name='group_$i' value='" . $request->{group}->name() . "'><input type='hidden' name='type_$i' value='" . $request->{type} . "'><input type='hidden' name='login_$i' value=\"".$request->{user}->login()."\"></td><td><input type='Radio' name='handling_$i' value='accept'></td><td><input type='radio' name='handling_$i' value='reject'></td><td><input type='radio' name='handling_$i' value='defer' checked='checked'></td><td><input type='text' name='reason_$i' value='-'></td></tr>";
$i++;
}
$html .= "</table><input type='submit' value='submit'>";

0 comments on commit e0c7abb

Please sign in to comment.