mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
comments and also check for email confirmed
This commit is contained in:
parent
3f4ce13cc8
commit
6f4a04c015
@ -6,12 +6,14 @@
|
||||
*/
|
||||
|
||||
export async function upgrade(queryFn: (query: string, values?: any[]) => Promise<Array<any>>) {
|
||||
// Generate a random private key where the remaining data is present
|
||||
// Generate a random private key where the required data is present (pubkey + password + passphrase).
|
||||
// Furthermore the email needs to be confirmed
|
||||
await queryFn(
|
||||
`UPDATE login_users SET privkey = UNHEX(SHA1(RAND()))
|
||||
WHERE privkey IS NULL
|
||||
AND pubkey IS NOT NULL
|
||||
AND password != 0
|
||||
AND email_checked = 1
|
||||
AND id IN (SELECT user_id FROM login_user_backups);`,
|
||||
)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user