Commit 90b9f7da authored by Carsten  Rose's avatar Carsten Rose
Browse files

Update self registration.

parent d81a58aa
Pipeline #5252 passed with stages
in 3 minutes and 13 seconds
...@@ -181,43 +181,43 @@ Page Alias: set ...@@ -181,43 +181,43 @@ Page Alias: set
QFQ content record:: QFQ content record::
# #
# {{auth:CE}} - empty >> Form 'setPassword' # {{auth:CE}} - empty >> Form 'setPassword'
# {{auth:CE}} - unknown | expired >> Error message # {{auth:CE}} - unknown | expired >> Error message
# {{auth:SE}} - valid >> Set Password # {{auth:SE}} - valid >> Set Password
# #
# {{action:CE}} - 'thanks' # {{action:CE}} - 'thanks'
form={{SELECT IF( ISNULL(p.id), '', 'passwordSet' ) form={{SELECT IF( ISNULL(p.id), '', 'passwordSet' )
FROM (SELECT '') AS fake FROM (SELECT '') AS fake
LEFT JOIN Person AS p LEFT JOIN Person AS p
ON p.auth='{{auth:C:alnumx}}' ON p.auth='{{auth:C:alnumx}}'
AND p.auth!='' AND p.auth!=''
AND NOW()<p.authExpire }} AND NOW()<p.authExpire }}
r={{SELECT IFNULL(p.id, 0) FROM (SELECT '') AS fake LEFT JOIN Person AS p ON p.auth='{{auth:C:alnumx}}' AND p.auth!='' AND NOW()<p.authExpire}} r={{SELECT IFNULL(p.id, 0) FROM (SELECT '') AS fake LEFT JOIN Person AS p ON p.auth='{{auth:C:alnumx}}' AND p.auth!='' AND NOW()<p.authExpire}}
10 { 10 {
sql = SELECT IF( ISNULL(p.id) sql = SELECT IF( ISNULL(p.id)
, 'Token invalid' , 'Token invalid'
, IF( NOW()<p.authExpire , IF( NOW()<p.authExpire
,'' ,''
, IF( p.authExpire=0, 'Password already set', 'Token expired') ) , IF( p.authExpire=0, 'Password already set', 'Token expired') )
) )
FROM (SELECT '') AS fake FROM (SELECT '') AS fake
LEFT JOIN Person AS p LEFT JOIN Person AS p
ON p.auth='{{auth:C:alnumx}}' ON p.auth='{{auth:C:alnumx}}'
AND p.auth!='' AND p.auth!=''
WHERE '{{action:SE}}'='' WHERE '{{action:SE}}'=''
AND (ISNULL(p.id) OR NOW()>=p.authExpire) AND (ISNULL(p.id) OR NOW()>=p.authExpire)
head = <div class="alert alert-warning" role="alert"> head = <div class="alert alert-warning" role="alert">
tail = </div> tail = </div>
} }
20.sql = SELECT 'Thanks for setting the password. Please <a href="?id=login">log in</a> now.' 20.sql = SELECT 'Thanks for setting the password. Please <a href="?id=login">log in</a> now.'
FROM (SELECT '') AS fake FROM (SELECT '') AS fake
WHERE '{{action:SE}}'='thanks' WHERE '{{action:SE}}'='thanks'
Form: passwordSet Form: passwordSet
""""""""""""""""" """""""""""""""""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment