aboutsummaryrefslogtreecommitdiff
path: root/actions/profile/fields/edit.php
diff options
context:
space:
mode:
Diffstat (limited to 'actions/profile/fields/edit.php')
-rw-r--r--actions/profile/fields/edit.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/actions/profile/fields/edit.php b/actions/profile/fields/edit.php
new file mode 100644
index 000000000..5fc84ff11
--- /dev/null
+++ b/actions/profile/fields/edit.php
@@ -0,0 +1,20 @@
+<?php
+/**
+ * Edit a custom profile field
+ */
+
+$id = get_input('id');
+$label = get_input('label');
+
+if (!elgg_get_config("admin_defined_profile_$id")) {
+ register_error(elgg_echo('profile:editdefault:fail'));
+ forward(REFERER);
+}
+
+if (elgg_save_config("admin_defined_profile_$id", $label)) {
+ system_message(elgg_echo('profile:editdefault:success'));
+} else {
+ register_error(elgg_echo('profile:editdefault:fail'));
+}
+
+forward(REFERER); \ No newline at end of file