renamed TABLE_USER to TABLE_APIKEYS
Signed-off-by: tracer <tracer@24unix.net>
This commit is contained in:
parent
37cf94bbe6
commit
d83126ac79
@ -18,7 +18,7 @@ class DatabaseConnection
|
||||
const TABLE_DOMAINS = self::TABLE_PREFIX . "domains";
|
||||
const TABLE_NAMESERVERS = self::TABLE_PREFIX . "nameservers";
|
||||
const TABLE_PANELS = self::TABLE_PREFIX . "panels";
|
||||
const TABLE_USER = self::TABLE_PREFIX . "apikeys";
|
||||
const TABLE_APIKEYS = self::TABLE_PREFIX . "apikeys";
|
||||
|
||||
public function __construct(private array $config)
|
||||
{
|
||||
@ -105,13 +105,16 @@ class DatabaseConnection
|
||||
}
|
||||
|
||||
|
||||
function generatePassword($length = 8) {
|
||||
|
||||
/**
|
||||
* @param int $length
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function generatePassword(int $length = 8): string
|
||||
{
|
||||
$chars = '23456789bcdfhkmnprstvzBCDFHJKLMNPRSTVZ';
|
||||
$shuffled = str_shuffle($chars);
|
||||
$result = mb_substr($shuffled, 0, $length);
|
||||
|
||||
return $result;
|
||||
$shuffled = str_shuffle(string: $chars);
|
||||
return mb_substr(string: $shuffled, start: 0, length: $length);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user