<?php
-if ($Args) {
- $Place['user'] = ltrim($Args, '/');
- include 'login/edit/index.html';
+if ($Args and $User->admin('user')) {
+ $user = new User(strtolower("profile$Args"), FALSE);
+ $Article->title = "Profiel <em>{$user->login}</em>";
+ print "<h2>{$Article->title}</h2>\n";
+ print placeholder_include('login/edit');
return;
}
<?php
-global $User;
-if (empty($user = &$User)) {
- return;
+global $User, $user;
+if (!$user) {
+ $user = $User;
}
-
-if ($User->admin('user')
-and !empty($Place['user']) and $Place['user'] !== $User->login) {
- $username = strtolower($Place['user']);
- unset($user);
- $user = new User("profile/$username", FALSE);
+if (!$user) {
+ return;
}
require_once('edit.inc.php');