aboutsummaryrefslogtreecommitdiff
path: root/actions/profile/fields/edit.php
blob: 5fc84ff11bf4462c387e6f1cfd6b13fd83204f40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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);