hai klenmen
well im facing a samll trouble out here ...
well there is a chance that a login is created for the the same user twice .....is there a fix to prevent repetition of username,category....
pls help
duplicate user name
Moderator: mkoch227
Hi,
I'm aware of the problem and it's already fixed in the 0.95 version (which will probably be released by the end of this year). For now you can try fixing this manually by changing:
In manage_users.php change the FIRST (leave the second instance of this code intact) to
This will take care of duplicate usernames. Similalry you can get rid of duplicate categories, in manage_categories.php change to
I'm aware of the problem and it's already fixed in the 0.95 version (which will probably be released by the end of this year). For now you can try fixing this manually by changing:
In manage_users.php change the FIRST (leave the second instance of this code intact)
Code: Select all
$myuser=hesk_validateUserInfo();
Code: Select all
$myuser = hesk_validateUserInfo();
$sql = "SELECT * FROM `hesk_users` WHERE `user` = '$myuser[user]' LIMIT 1";
$result = hesk_dbQuery($sql) or hesk_error("$hesklang[cant_sql]: $sql</p><p>$hesklang[mysql_said]:<br>".mysql_error()."</p><p>$hesklang[contact_webmsater] $hesk_settings[webmaster_mail]");
if (hesk_dbNumRows($result) != 0)
{
hesk_error('Duplicate username!');
}
Code: Select all
$catname=hesk_Input($_POST['name'],$hesklang['enter_cat_name']);
Code: Select all
$catname=hesk_Input($_POST['name'],$hesklang['enter_cat_name']);
$sql = "SELECT * FROM `hesk_categories` WHERE `name` = '$catname' LIMIT 1";
$result = hesk_dbQuery($sql) or hesk_error("$hesklang[cant_sql]: $sql</p><p>$hesklang[mysql_said]:<br>".mysql_error()."</p><p>$hesklang[contact_webmsater] $hesk_settings[webmaster_mail]");
if (hesk_dbNumRows($result) != 0)
{
hesk_error('Duplicate category name!');
}
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools