blob: 26b596f9036cc9ff0e33204e45aa3fc76af1842d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
<?php
/**
* Elgg profile plugin edit default profile action
*
* @package ElggProfile
*/
global $CONFIG;
admin_gatekeeper();
if ($fieldlist = get_plugin_setting('user_defined_fields', 'profile')) {
$fieldlistarray = explode(',', $fieldlist);
foreach($fieldlistarray as $listitem) {
set_plugin_setting("admin_defined_profile_{$listitem}", '', 'profile');
set_plugin_setting("admin_defined_profile_type_{$listitem}", '', 'profile');
}
}
set_plugin_setting('user_defined_fields', FALSE, 'profile');
system_message(elgg_echo('profile:defaultprofile:reset'));
forward($_SERVER['HTTP_REFERER']);
|