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() ) {
21 confirm_failure
($page, "No confirmation is required for user <b>$username</b>. This account has already been confirmed. <p><a href='/user/login?goto_url=%2F'>[Login Page]</a></p>");
24 if ( $sp->get_confirm_code() ne $confirm_code ) {
25 confirm_failure
($page, "Confirmation code is not valid!\n");
28 $sp->set_disabled(undef);
29 $sp->set_confirm_code(undef);
30 $sp->set_private_email( $sp->get_pending_email() );
38 <p>Confirmation successful for username <b>$username</b>.</p>
40 <p><a href="/user/login?goto_url=%2F">[Login Page]</a></p>
48 my ($page, $reason) = @_;
54 <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>
56 <p><b>Reason:</b> $reason</p>