account.php 604 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. /**
  3. * Elgg user account settings.
  4. *
  5. * @package Elgg
  6. * @subpackage Core
  7. */
  8. // Only logged in users
  9. elgg_gatekeeper();
  10. // Make sure we don't open a security hole ...
  11. if ((!elgg_get_page_owner_entity()) || (!elgg_get_page_owner_entity()->canEdit())) {
  12. register_error(elgg_echo('noaccess'));
  13. forward('/');
  14. }
  15. $title = elgg_echo('usersettings:user', array(elgg_get_page_owner_entity()->name));
  16. $content = elgg_view('core/settings/account');
  17. $params = array(
  18. 'content' => $content,
  19. 'title' => $title,
  20. );
  21. $body = elgg_view_layout('one_sidebar', $params);
  22. echo elgg_view_page($title, $body);