Commit 42bf4809 authored by Aaron Wells's avatar Aaron Wells
Browse files

Config option to always allow users to delete their accounts

Bug 1281364

Change-Id: Icd51e651b9caed278fd1074a15e177996a9fffac
parent f0b7b6ed
......@@ -1203,6 +1203,11 @@ class User {
public function can_delete_self() {
if (!$this->get('admin')) {
if (get_config('alwaysallowselfdelete')) {
return true;
}
// Users who belong to an institution that doesn't allow
// registration cannot delete themselves.
foreach ($this->get('institutions') as $i) {
......
......@@ -577,3 +577,10 @@ $cfg->usersuniquebyusername = false;
* @global bool $cfg->publicsearchallowed Activates the display of the search box for logged-out users
*/
$cfg->publicsearchallowed = false;
/**
* @global bool $cfg->alwaysallowselfdelete Set this to "true" to allow all users on the site to delete
* their accounts. Leave on the default "false" to only allow users to delete their accounts if they
* belong to an institution that allows self-registration.
*/
//$cfg->alwaysallowselfdelete = true;
\ No newline at end of file
Supports Markdown
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