Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
42bf4809
Commit
42bf4809
authored
Mar 10, 2014
by
Aaron Wells
Browse files
Config option to always allow users to delete their accounts
Bug 1281364 Change-Id: Icd51e651b9caed278fd1074a15e177996a9fffac
parent
f0b7b6ed
Changes
2
Hide whitespace changes
Inline
Side-by-side
htdocs/auth/user.php
View file @
42bf4809
...
...
@@ -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
)
{
...
...
htdocs/lib/config-defaults.php
View file @
42bf4809
...
...
@@ -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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment