mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-12-30 02:26:11 -05:00
Ensure that the guest user is in the database when upgrading accounts
This commit is contained in:
parent
58930da52b
commit
10c843fcfb
@ -127,11 +127,24 @@ class RegistrationStore(SQLBaseStore):
|
||||
|
||||
try:
|
||||
if was_guest:
|
||||
# Ensure that the guest user actually exists
|
||||
self._simple_select_one_txn(
|
||||
txn,
|
||||
"users",
|
||||
keyvalues={
|
||||
"name": user_id,
|
||||
"is_guest": 1,
|
||||
},
|
||||
retcols=("name",),
|
||||
allow_none=False,
|
||||
)
|
||||
|
||||
self._simple_update_one_txn(
|
||||
txn,
|
||||
"users",
|
||||
keyvalues={
|
||||
"name": user_id,
|
||||
"is_guest": 1,
|
||||
},
|
||||
updatevalues={
|
||||
"password_hash": password_hash,
|
||||
|
Loading…
Reference in New Issue
Block a user