aboutsummaryrefslogtreecommitdiffhomepage
path: root/routes/actor_profile_fragment.php
diff options
context:
space:
mode:
Diffstat (limited to 'routes/actor_profile_fragment.php')
-rw-r--r--routes/actor_profile_fragment.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/routes/actor_profile_fragment.php b/routes/actor_profile_fragment.php
index 0a07924..0a2a881 100644
--- a/routes/actor_profile_fragment.php
+++ b/routes/actor_profile_fragment.php
@@ -70,4 +70,11 @@ Router::getInstance()->mount('/fragment/profile', function (array $args) {
} else {
render_template('actor_profile_editable', ['actor' => $actor]);
}
+});
+
+Router::getInstance()->mount('/fragment/profile/resetAvatar', function (array $args) {
+ $user = UserAccount::requireByCurrentSession();
+ $user->actor->avatar = null;
+ $user->actor->save();
+ render_template('actor_profile_reset_avatar', ['reset' => true]);
}); \ No newline at end of file