mirror of
https://github.com/hotspotbilling/phpnuxbill.git
synced 2025-08-01 08:44:37 +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;
|
$pppoeDiff = false;
|
||||||
$passDiff = false;
|
$passDiff = false;
|
||||||
if ($oldusername != $username) {
|
if ($oldusername != $username) {
|
||||||
$cx = ORM::for_table('tbl_customers')->where('username', $username)->find_one();
|
if (ORM::for_table('tbl_customers')->where('username', $username)->find_one()) {
|
||||||
if ($cx) {
|
$msg .= Lang::T('Username already used by another customer') . '<br>';
|
||||||
$msg .= Lang::T('Account already exist') . '<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;
|
$userDiff = true;
|
||||||
}
|
}
|
||||||
if ($oldPppoeUsername != $pppoe_username) {
|
if ($oldPppoeUsername != $pppoe_username) {
|
||||||
$pppoeDiff = true;
|
|
||||||
if(ORM::for_table('tbl_customers')->where('pppoe_username', $pppoe_username)->find_one()){
|
if(ORM::for_table('tbl_customers')->where('pppoe_username', $pppoe_username)->find_one()){
|
||||||
$msg.= Lang::T('PPPoE Username already used by another customer') . '<br>';
|
$msg.= Lang::T('PPPoE Username already used by another customer') . '<br>';
|
||||||
}
|
}
|
||||||
if(ORM::for_table('tbl_customers')->where('username', $pppoe_username)->find_one()){
|
if(ORM::for_table('tbl_customers')->where('username', $pppoe_username)->find_one()){
|
||||||
$msg.= Lang::T('PPPoE Username already used by another customer') . '<br>';
|
$msg.= Lang::T('PPPoE Username already used by another customer') . '<br>';
|
||||||
}
|
}
|
||||||
|
$pppoeDiff = true;
|
||||||
}
|
}
|
||||||
if ($password != '' && $oldPassPassword != $password) {
|
if ($password != '' && $oldPassPassword != $password) {
|
||||||
$passDiff = true;
|
$passDiff = true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue