Fossil SCM
Fix self-registration so that it can work even if email alerts are not enabled. See forum post [https://www.fossil-scm.org/forum/info/e012e702de4ed1e2].
Commit
02c3080bb24f2d7ddbff2da51831274c30eff889b0325e398e8d48f2e240f4c9
Parent
bc6651331a81baa…
1 file changed
+4
-3
+4
-3
| --- src/login.c | ||
| +++ src/login.c | ||
| @@ -1591,13 +1591,14 @@ | ||
| 1591 | 1591 | /* If the email is found anywhere in USER.INFO... */ |
| 1592 | 1592 | db_exists("SELECT 1 FROM user WHERE info LIKE '%%%q%%'", zEAddr) |
| 1593 | 1593 | || |
| 1594 | 1594 | /* Or if the email is a verify subscriber email with an associated |
| 1595 | 1595 | ** user... */ |
| 1596 | - db_exists( | |
| 1597 | - "SELECT 1 FROM subscriber WHERE semail=%Q AND suname IS NOT NULL" | |
| 1598 | - " AND sverified",zEAddr) | |
| 1596 | + (alert_tables_exist() && | |
| 1597 | + db_exists( | |
| 1598 | + "SELECT 1 FROM subscriber WHERE semail=%Q AND suname IS NOT NULL" | |
| 1599 | + " AND sverified",zEAddr)) | |
| 1599 | 1600 | ){ |
| 1600 | 1601 | iErrLine = 3; |
| 1601 | 1602 | zErr = "This email address is already claimed by another user"; |
| 1602 | 1603 | }else{ |
| 1603 | 1604 | /* If all of the tests above have passed, that means that the submitted |
| 1604 | 1605 |
| --- src/login.c | |
| +++ src/login.c | |
| @@ -1591,13 +1591,14 @@ | |
| 1591 | /* If the email is found anywhere in USER.INFO... */ |
| 1592 | db_exists("SELECT 1 FROM user WHERE info LIKE '%%%q%%'", zEAddr) |
| 1593 | || |
| 1594 | /* Or if the email is a verify subscriber email with an associated |
| 1595 | ** user... */ |
| 1596 | db_exists( |
| 1597 | "SELECT 1 FROM subscriber WHERE semail=%Q AND suname IS NOT NULL" |
| 1598 | " AND sverified",zEAddr) |
| 1599 | ){ |
| 1600 | iErrLine = 3; |
| 1601 | zErr = "This email address is already claimed by another user"; |
| 1602 | }else{ |
| 1603 | /* If all of the tests above have passed, that means that the submitted |
| 1604 |
| --- src/login.c | |
| +++ src/login.c | |
| @@ -1591,13 +1591,14 @@ | |
| 1591 | /* If the email is found anywhere in USER.INFO... */ |
| 1592 | db_exists("SELECT 1 FROM user WHERE info LIKE '%%%q%%'", zEAddr) |
| 1593 | || |
| 1594 | /* Or if the email is a verify subscriber email with an associated |
| 1595 | ** user... */ |
| 1596 | (alert_tables_exist() && |
| 1597 | db_exists( |
| 1598 | "SELECT 1 FROM subscriber WHERE semail=%Q AND suname IS NOT NULL" |
| 1599 | " AND sverified",zEAddr)) |
| 1600 | ){ |
| 1601 | iErrLine = 3; |
| 1602 | zErr = "This email address is already claimed by another user"; |
| 1603 | }else{ |
| 1604 | /* If all of the tests above have passed, that means that the submitted |
| 1605 |