[Home]WikiPatches/PageIsUserHomePage

UseModWiki | WikiPatches | RecentChanges | Preferences

This partial patch uses WikiPatches/UserList.

It makes possible to discriminate User HomePages from All Pages List on Indexing Schemes.

sub PageIsUserHomePage {
  my ($id) = @_;
  my (%userdata);
  my (@usernames, $username, $name);
  my $i;

  $i = 0;
  for ($i= 1001; ; ++$i) {
    %userdata = &LoadUserDataById($i);
    last unless scalar %userdata;
    if ($userdata{username}) {
      push (@usernames, $userdata{username});
    }
  }
  foreach $username (@usernames) {
    return 1 if ($id eq $username);
  }
  return 0;
}
-- JuanmaMP

UseModWiki | WikiPatches | RecentChanges | Preferences
Edit text of this page | View other revisions | Search MetaWiki
Last edited February 17, 2011 6:05 pm by JuanmaMP (diff)
Search: