5 if (run("users:type:get",$page_owner) == 'person' && run("permissions:check",array("userdetails:change", $page_owner))) {
7 if ($page_owner == $_SESSION['userid']) {
8 $name = htmlentities($_SESSION['name']);
9 $email = htmlentities($_SESSION['email']);
11 $info = db_query("select * from users where ident = $page_owner");
13 $name = htmlentities(stripslashes($info->name
));
14 $email = htmlentities(stripslashes($info->email
));
17 $changeName = gettext("Change your full name:"); // gettext variable
18 $displayed = gettext("This name will be displayed throughout the system."); // gettext variable
21 <form action
="index.php" method
="post">
32 $body .= run("templates:draw", array(
33 'context' => 'databox',
34 'name' => gettext("Your full name "),
35 'column1' => "<input type=\"text\" name=\"name\" value=\"$name\" />"
39 $emailAddress = gettext("Your email address:"); // gettext variable
40 $emailRules = gettext("This will not be displayed to other users; you can choose to make an email address available via the profile screen."); // gettext variable
52 $body .= run("templates:draw", array(
53 'context' => 'databox',
54 'name' => gettext("Your email address "),
55 'column1' => "<input type=\"text\" name=\"email\" value=\"$email\" />"
59 $emailReplies = gettext("Make comments public");
60 $emailRules = gettext("Set this to 'yes' if you would like anyone to be able to comment on your resources (by default only logged-in users can). Note that this may make you vulnerable to spam.");
64 <h2
>$emailReplies</h2
>
71 $emailreplies = run("users:flags:get",array("publiccomments",$page_owner));
73 $body .= run("templates:draw", array(
74 'context' => 'databox',
75 'name' => gettext("Public comments: "),
76 'column1' => "<label><input type=\"radio\" name=\"publiccomments\" value=\"yes\" checked=\"checked\" /> " . gettext("Yes") . "</label> <label><input type=\"radio\" name=\"publiccomments\" value=\"no\" /> " . gettext("No") . "</label>"
80 $body .= run("templates:draw", array(
81 'context' => 'databox',
82 'name' => gettext("Public comments: "),
83 'column1' => "<label><input type=\"radio\" name=\"publiccomments\" value=\"yes\" /> " . gettext("Yes") . "</label> <label><input type=\"radio\" name=\"publiccomments\" value=\"no\" checked=\"checked\" /> " . gettext("No") . "</label>"
88 $emailReplies = gettext("Receive email messages");
89 $emailRules = gettext("Set this to 'yes' if you would like to receive comments, replies and interesting discussion through your email. You can also access them by clicking on <a href=\"". url
."_activity/\">view your activity</a>.");
93 <h2
>$emailReplies</h2
>
100 $emailreplies = run("users:flags:get",array("emailreplies",$page_owner));
102 $body .= run("templates:draw", array(
103 'context' => 'databox',
104 'name' => gettext("Receive messages: "),
105 'column1' => "<label><input type=\"radio\" name=\"receiveemails\" value=\"yes\" checked=\"checked\" /> " . gettext("Yes") . "</label> <label><input type=\"radio\" name=\"receiveemails\" value=\"no\" /> " . gettext("No") . "</label>"
109 $body .= run("templates:draw", array(
110 'context' => 'databox',
111 'name' => gettext("Receive messages: "),
112 'column1' => "<label><input type=\"radio\" name=\"receiveemails\" value=\"yes\" /> " . gettext("Yes") . "</label> <label><input type=\"radio\" name=\"receiveemails\" value=\"no\" checked=\"checked\" /> " . gettext("No") . "</label>"
117 $password = gettext("Change your password:"); // gettext variable
118 $passwordRules = gettext("Leave this blank if you're happy to leave your password as it is."); // gettext variable
130 $body .= run("templates:draw", array(
131 'context' => 'databox',
132 'name' => gettext("Your password: "),
133 'column1' => "<input type=\"password\" name=\"password1\" value=\"\" />"
137 $body .= run("templates:draw", array(
138 'context' => 'databox',
139 'name' => gettext("Again for verification purposes: "),
140 'column1' => "<input type=\"password\" name=\"password2\" value=\"\" />"
144 // Allow plug-ins to add stuff ...
145 $body .= run("userdetails:edit:details");
149 $save = gettext("Save");
154 <input type
="hidden" name
="action" value
="userdetails:update" />
155 <input type
="hidden" name
="id" value
="$page_owner" />
156 <input type
="hidden" name
="profile_id" value
="$page_owner" />
157 <input type
="submit" value
="$save" />
164 $run_result .= $body;