mirror of
https://github.com/hotspotbilling/phpnuxbill.git
synced 2025-07-30 15:54:51 +02:00
check if customer username already used by pppoe_username
This commit is contained in:
parent
8ab1939dd9
commit
cb0e77523d
1 changed files with 6 additions and 4 deletions
|
@ -532,20 +532,22 @@ switch ($action) {
|
|||
$pppoeDiff = false;
|
||||
$passDiff = false;
|
||||
if ($oldusername != $username) {
|
||||
$cx = ORM::for_table('tbl_customers')->where('username', $username)->find_one();
|
||||
if ($cx) {
|
||||
$msg .= Lang::T('Account already exist') . '<br>';
|
||||
if (ORM::for_table('tbl_customers')->where('username', $username)->find_one()) {
|
||||
$msg .= Lang::T('Username already used by another customer') . '<br>';
|
||||
}
|
||||
if(ORM::for_table('tbl_customers')->where('pppoe_username', $username)->find_one()){
|
||||
$msg.= Lang::T('Username already used by another customer') . '<br>';
|
||||
}
|
||||
$userDiff = true;
|
||||
}
|
||||
if ($oldPppoeUsername != $pppoe_username) {
|
||||
$pppoeDiff = true;
|
||||
if(ORM::for_table('tbl_customers')->where('pppoe_username', $pppoe_username)->find_one()){
|
||||
$msg.= Lang::T('PPPoE Username already used by another customer') . '<br>';
|
||||
}
|
||||
if(ORM::for_table('tbl_customers')->where('username', $pppoe_username)->find_one()){
|
||||
$msg.= Lang::T('PPPoE Username already used by another customer') . '<br>';
|
||||
}
|
||||
$pppoeDiff = true;
|
||||
}
|
||||
if ($password != '' && $oldPassPassword != $password) {
|
||||
$passDiff = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue