page: replace global variables by $Page object
[minimedit.git] / widget / login / list.php
index 698b805dc30bb9989e4bb780be94d50aa05b0957..31d913044de23292e376502950621a09a789df64 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 $basepath = 'profile';
-if ($Args) $basepath .= '/.tags' . $Args;
+if ($Page->path) $basepath .= '/.tags' . $Page->path;
 $users = glob("$basepath/*/");
 if (!$users) return;
 
@@ -37,8 +37,8 @@ elseif (count($users) > 5) {
 print ">\n";
 
 foreach ($users as $user) {
-       $name = $user->name ?: $user->login;
-       if ($GLOBALS['User'] and $GLOBALS['User']->admin) {
+       $name = $user->html;
+       if ($GLOBALS['User'] and $GLOBALS['User']->admin('user')) {
                $link = '/login/edit/'.$user->login;
                $name = sprintf('<a href="%s">%s</a>', $link, $name);
        }