mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-12 08:16:11 +01:00
delete user: ref https://github.com/usmannasir/cyberpanel/issues/335
This commit is contained in:
@@ -24,7 +24,6 @@ from plogical.ftpUtilities import FTPUtilities
|
||||
from plogical.sslUtilities import sslUtilities
|
||||
from plogical.processUtilities import ProcessUtilities
|
||||
from plogical.backupSchedule import backupSchedule
|
||||
from django.http import HttpRequest
|
||||
|
||||
# All that we see or seem is but a dream within a dream.
|
||||
|
||||
@@ -1379,6 +1378,24 @@ def main():
|
||||
|
||||
print(response.content.decode())
|
||||
|
||||
elif args.function == "deleteUser":
|
||||
|
||||
completeCommandExample = 'cyberpanel deleteUser --userName cyberpanel'
|
||||
|
||||
if not args.userName:
|
||||
print("\n\nPlease enter User Name. For example:\n\n" + completeCommandExample + "\n\n")
|
||||
return
|
||||
|
||||
from userManagment.views import submitUserDeletion
|
||||
|
||||
data = {}
|
||||
data['accountUsername'] = args.userName
|
||||
data['userID'] = 1
|
||||
|
||||
response = submitUserDeletion(data)
|
||||
|
||||
print(response.content.decode())
|
||||
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user