Stories
Slash Boxes
Comments

Slash Open Source Project

This discussion has been archived. No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login
Loading... please wait.
  • You an have them, but you can only have one default AC. Someone at one point either rigged or figured out how to rig a site with anonymous Democrats and anonymous Republicans...
    --

    --
    You can't grep a dead tree.
    • There are places in the code that assume the anonymous user will be a single UID.

      From isAnon():
      return $uid == getCurrentStatic('anonymous_coward_uid');

      From prepareUser():
          $user = $slashdb->getUser($constants->{ anonymous_coward_uid });
      }
      $user->{is_anon} = 1;

      There may be other places that don't use is_anon or isAnon() (although every place should use one or the other), but those two places would need to be modified to work on alternate UIDs, either by making anonymous_coward_uid multiple values, or by having multiple constants, and having those two routines work on them all.

      Once that is done, then is_anon and isAnon will work just fine for multiple anonymous user accounts. Of course, you still haven't determined how to know if an anonymous user is one or another ...

      NP: The Ascent of Stan - Ben Folds (Rockin' the Suburbs)

      • by pudge (6) on Thursday January 10 2002, @12:46PM (#3980) Homepage
        To clarify: that is if you want dual anonymous users. To have an unregistered vs. anonymous, you would need to change the name of anonymous to unregistered, and know that isAnon etc. means "is not logged in".

        Then if all you want is people to be able to post comments anonymously, but differentiate them from unregistered users, look at the code for how a logged-in user can post anonymously, and modify that to change the uid to something instead of anonymous_coward_uid (look for "postanon").