1.0.0
parent
ea0f737219
commit
7c26c9adf3
|
@ -39,6 +39,10 @@ function generateRandomPassword($length = 12) {
|
||||||
|
|
||||||
// Get the next available IP address
|
// Get the next available IP address
|
||||||
function getNextIp($users) {
|
function getNextIp($users) {
|
||||||
|
if (empty($users)) {
|
||||||
|
return '10.255.10.11';
|
||||||
|
}
|
||||||
|
|
||||||
$lastIp = end($users)['ip'];
|
$lastIp = end($users)['ip'];
|
||||||
$lastIpLong = ip2long($lastIp);
|
$lastIpLong = ip2long($lastIp);
|
||||||
$nextIpLong = $lastIpLong + 1;
|
$nextIpLong = $lastIpLong + 1;
|
||||||
|
|
Loading…
Reference in New Issue