aboutsummaryrefslogtreecommitdiff
path: root/actions/profile/fields/reset.php
blob: 19efae47999ef11d6af968d7f0625537b46e7eb1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php
/**
 * Reset profile fields action
 *
 */

$fieldlist = elgg_get_config('profile_custom_fields');
if ($fieldlist) {
	$fieldlistarray = explode(',', $fieldlist);
	foreach ($fieldlistarray as $listitem) {
		unset_config("admin_defined_profile_{$listitem}");
		unset_config("admin_defined_profile_type_{$listitem}");
	}
}

unset_config('profile_custom_fields');

system_message(elgg_echo('profile:defaultprofile:reset'));

forward(REFERER);