mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-08 22:36:12 +01:00
select more random user
This commit is contained in:
@@ -1953,6 +1953,8 @@ class BackupManager:
|
|||||||
for items in not_allowed_characters:
|
for items in not_allowed_characters:
|
||||||
userName = userName.replace(items, '')
|
userName = userName.replace(items, '')
|
||||||
|
|
||||||
|
import plogical.randomPassword as randomPassword
|
||||||
|
|
||||||
backup_plan = OneClickBackups(
|
backup_plan = OneClickBackups(
|
||||||
owner=user,
|
owner=user,
|
||||||
planName=plan_name,
|
planName=plan_name,
|
||||||
@@ -1960,7 +1962,7 @@ class BackupManager:
|
|||||||
price=price,
|
price=price,
|
||||||
customer=customer,
|
customer=customer,
|
||||||
subscription=subscription,
|
subscription=subscription,
|
||||||
sftpUser=f'{userName}{str(randint(1000, 9999))}',
|
sftpUser=f'{userName}_{randomPassword.generate_pass(8)}'.lower(),
|
||||||
)
|
)
|
||||||
backup_plan.save()
|
backup_plan.save()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user