Файл: EasyHost v2.0/system/htdocs/validate/default.pl
Строк: 22
<?php
$system->error('The validation code field is required') if ($system->param('code') < 1);
$system->error('The validation code field contains invalid characters') if ($system->param('code') !~ /^d+$/);
my $id = $system->db->selectrow_array('SELECT id FROM users_config WHERE name = ? AND value = ? ORDER BY id DESC LIMIT 1',undef,'validate',$system->param('code')) || $system->error('The validation code you entered wasn't found in our database');
my $user = EasyHost::User->new($id);
$system->db->do('UPDATE users SET status = ? WHERE id = ?',undef,1,$user->id);
$system->db->do('DELETE FROM users_config WHERE id = ? AND name = ?',undef,$user->id,'validate');
$user->notice('validate','validated account');
$system->redirect('finish');
?>