<?php
$system->error('The username field is required') if ($system->param('id') == 0 && length $system->param('username') == 0);
my $user = EasyHost::User->new($system->param('id') || $system->db->selectrow_array('SELECT id FROM users WHERE name = ?',undef,lc $system->param('username'))) || $system->error('The username you entered wasn't found in the database');
$system->argv('&id='.$user->id);
?>