Quote:
Originally Posted by hoochblues
This looks pretty good. The only problem I found was it allows me to enter the name of a user that doesn't exist. But I think it is almot there.
|
For the username check...
Form Hook: Before Submit:
PHP Code:
$checkuser = $vbulletin->db->query_first("SELECT userid FROM " . TABLE_PREFIX . "user WHERE username = '".$vbulletin->db->escape_string($q['username'])."' ");
if (!$checkuser['userid']&&$q['username'])
{
$preview = true;
$complete = false;
$inputerror[344] = '<font color="red">Invalid Username</font>';
$incompleteqs[] = $qn['username'];
}
Change 344 to the question hash
and make sure the Username Suggest question has Reference Name of: