5 use CXGN
::DB
::Connection
;
8 use CXGN
::People
::Login
;
10 my $page = CXGN
::Page
->new( "solpeople User Confirmation", "Koni" );
11 my $dbh = CXGN
::DB
::Connection
->new();
13 my ( $username, $confirm_code ) = $page->get_arguments( "username", "confirm" );
14 my $sp = CXGN
::People
::Login
->get_login( $dbh, $username );
17 confirm_failure
($page, "Username \"$username\" was not found.");
20 if ( $sp->get_confirm_code() ne $confirm_code ) {
21 confirm_failure
($page, "Confirmation code is not valid!\n");
23 if ( !$sp->get_confirm_code() ) {
24 confirm_failure
($page, "No confirmation is required for user <b>$username</b>");
27 $sp->set_disabled(undef);
28 $sp->set_confirm_code(undef);
29 $sp->set_private_email( $sp->get_pending_email() );
37 <p>Confirmation successful for username <b>$username</b>.</p>
39 <p><a href="login.pl">[Login Page]</a></p>
47 my ($page, $reason) = @_;
53 <p>Sorry, we are unable to process this confirmation request. Please check that your complete confirmation URL has been pasted correctly into your browser.</p>
55 <p><b>Reason:</b> $reason</p>