summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMalf Furious <m@lfurio.us>2016-05-01 00:45:37 -0400
committerMalf Furious <m@lfurio.us>2016-05-01 01:34:23 -0400
commit190a7d81155bc08fd9533f53f1f2154e2cca2c7a (patch)
tree15c5966fc65b1f75092eeb37331d6b6881b83af6
parente9189928e1108d0c1330eb47cc5de20d67f5de51 (diff)
downloadscrott-190a7d81155bc08fd9533f53f1f2154e2cca2c7a.tar.gz
scrott-190a7d81155bc08fd9533f53f1f2154e2cca2c7a.zip
Update setting modal to allow admins to remove other users' head images
Diffstat (limited to '')
-rw-r--r--app/model/common.mod.php10
-rw-r--r--app/view/common/setting.modal.view.php2
2 files changed, 11 insertions, 1 deletions
diff --git a/app/model/common.mod.php b/app/model/common.mod.php
index 32bdb44..7630dfa 100644
--- a/app/model/common.mod.php
+++ b/app/model/common.mod.php
@@ -239,6 +239,16 @@ class CommonModel extends MasterModel
return;
}
+ if (isset($input['rmImage']))
+ {
+ if ($user->rmHeadImage())
+ $this->logNotice("Image removed");
+ else
+ $this->logError("Error removing user image");
+
+ return;
+ }
+
if ($form->setPasswd)
{
if ($form->newPasswd == $form->confPasswd)
diff --git a/app/view/common/setting.modal.view.php b/app/view/common/setting.modal.view.php
index 60063cf..e43f723 100644
--- a/app/view/common/setting.modal.view.php
+++ b/app/view/common/setting.modal.view.php
@@ -245,7 +245,7 @@
<span class="glyphicon glyphicon-camera"></span> Upload new image
</button>
<br />
- <button type="button" class="btn btn-danger btn-xs">
+ <button type="submit" name="input[rmImage]" class="btn btn-danger btn-xs" onclick="return assertConfirm()">
<span class="glyphicon glyphicon-remove"></span> Remove image
</button>
</div>