Differences From Artifact [e26e425738]:
- File src/setupuser.c — part of check-in [ca9156aa0a] at 2020-08-18 01:54:25 on branch sec2020 — Disable writes the CONFIG and USER tables by default. Permission to write to those tables is turned on as needed. Note - might have missed a few places so expect bugs. (user: drh size: 30769) [more...]
To Artifact [4b57bec5a1]:
- File src/setupuser.c — part of check-in [b6b5a7dc62] at 2020-10-28 16:13:42 on branch trunk — When deleting a subscription, also provide the opportunity to delete the corresponding user. When deleting a user, always also delete subscriptions associated with that user. (user: drh size: 31033) [more...]
| ︙ | |||
314 315 316 317 318 319 320 321 322 323 324 325 326 327 | 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 | + + + + + |
/* Check for requests to delete the user */
if( P("delete") && cgi_csrf_safe(1) ){
int n;
if( P("verifydelete") ){
/* Verified delete user request */
db_unprotect(PROTECT_USER);
if( db_table_exists("repository","subscriber") ){
/* Also delete any subscriptions associated with this user */
db_multi_exec("DELETE FROM subscriber WHERE suname="
"(SELECT login FROM user WHERE uid=%d)", uid);
}
db_multi_exec("DELETE FROM user WHERE uid=%d", uid);
db_protect_pop();
moderation_disapprove_for_missing_users();
admin_log("Deleted user [%s] (uid %d).",
PD("login","???")/*safe-for-%s*/, uid);
cgi_redirect(cgi_referer("setup_ulist"));
return;
|
| ︙ |