edit.php 435 B

1234567891011121314151617181920
  1. <?php
  2. /**
  3. * Edit a custom profile field
  4. */
  5. $id = get_input('id');
  6. $label = get_input('label');
  7. if (!elgg_get_config("admin_defined_profile_$id")) {
  8. register_error(elgg_echo('profile:editdefault:fail'));
  9. forward(REFERER);
  10. }
  11. if (elgg_save_config("admin_defined_profile_$id", $label)) {
  12. system_message(elgg_echo('profile:editdefault:success'));
  13. } else {
  14. register_error(elgg_echo('profile:editdefault:fail'));
  15. }
  16. forward(REFERER);