blob: 0ffb8783f8948c7186b45f0c5adfb56a4781590c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
<?php
/**
* Edit profile page
*/
gatekeeper();
$user = elgg_get_page_owner_entity();
if (!$user) {
register_error(elgg_echo("profile:notfound"));
forward();
}
// check if logged in user can edit this profile
if (!$user->canEdit()) {
register_error(elgg_echo("profile:noaccess"));
forward();
}
elgg_set_context('profile_edit');
$title = elgg_echo('profile:edit');
$content = elgg_view_form('profile/edit', array(), array('entity' => $user));
$params = array(
'content' => $content,
'title' => $title,
);
$body = elgg_view_layout('one_sidebar', $params);
echo elgg_view_page($title, $body);
|