mirror of
https://github.com/fastogt/fastocloud_admin.git
synced 2025-03-09 23:38:52 +00:00
Email for resellers
This commit is contained in:
parent
15595bbe37
commit
47a48409ab
1 changed files with 2 additions and 2 deletions
|
@ -4,12 +4,12 @@ from app.service.service import ServiceSettings, ProviderPair
|
|||
|
||||
def import_resellers_to_server(db, server: ServiceSettings):
|
||||
cursor = db.cursor(dictionary=True)
|
||||
sql = 'SELECT username,password from reg_users'
|
||||
sql = 'SELECT username,email,password from reg_users'
|
||||
cursor.execute(sql)
|
||||
sql_providers = cursor.fetchall()
|
||||
|
||||
for sql_entry in sql_providers:
|
||||
new_user = ProviderUser.make_provider(email=sql_entry['username'], password=sql_entry['username'], country='US')
|
||||
new_user = ProviderUser.make_provider(email=sql_entry['email'], password=sql_entry['email'], country='US')
|
||||
new_user.status = ProviderUser.Status.ACTIVE
|
||||
new_user.save()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue