Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Unique usernames/email addresses

edited August 2005 in Vanilla 1.0 Help
anyone know if there is a way to allow only unique usernames and email addresses? I suppose I could make a database schema change during installation on these fields in the user tables but I'd be afraid to break something. Looking for and easier way... Regards, Frank
«1

Comments

  • Options
    well i'm pretty sure usernames have to be unique? As for email addresses, i'd assume this is also true, if not it sounds like it should be and mark might not have realised. In any case i'd assume you could change the class *somehow* so it checks if the email was already there without too much hacking, but dont quote me :)
  • Options
    MarkMark Vanilla Staff
    Usernames *are* unique already. I've allowed duplicate email addresses because I thought they *shouldn't* be unique. All password retrieval and whatnot is handled by the unique usernames, anyway. And believe it or not, I've had problems on forums in the past where I've made unique email addresses manditory and then had couples complain because they share an email address and don't want a new one.
  • Options
    lechlech Chicagoland
    I always wondered about why that was changed from email to user name... perhaps matching both user name and email for password retrieval would be cool to prevent someone spamming your box when they're trying to hack away at your password.
  • Options
    MarkMark Vanilla Staff
    I think it's neat the way it is.
  • Options
    lechlech Chicagoland
    yeah, no complaints there. :D
  • Options
    lechlech Chicagoland
    Actually, this just sparked an idea in my mind for a possible feature request to the Applications Settings. "Allow Email Sharing" just in case an admin wants to weed out potential duplicating or account cloning. While writing the IP histories and Tips & Tricks for admins documentation it came to me. Otherwise there's really no way to head this kind of abuse off from repeating itself if it actually happens. Thoughts?
  • Options
    well I guess where I was leading to was the ability to do an emailing to all users in the forums. Elimintating duped addresses is exactly what I had in mind with my original post. By the way...IS there a utility that does mass emailings for Vanilla? Or at least allows me to pull all the emails from the user tables short of writing an sql script to do so?
  • Options
    lechlech Chicagoland
    edited August 2005
    By the way...IS there a utility that does mass emailings for Vanilla? Or at least allows me to pull all the emails from the user tables short of writing an sql script to do so?

    At the moment, no, there is nothing available. However I'm fairly certain it could be easily done as an extension. However there won't be any "opt-out" function unless you can somehow figure a way to do that on the fly. If nobody else makes this, I suppose I could take a stab at it.
  • Options
    MarkMark Vanilla Staff
    I nominate this extension idea as vanilla's first "evil extension idea". Hurray! ... Seriously, though... The email addresses are in there - it's a simple matter of querying the database and grouping by that field. Lech is correct that you should also have an opt-out feature to go along with the extension, and that feature should probably be present on both the user's account page and the registration form. I'm going to have to think about a slick way of accomplishing this.
  • Options
    lechlech Chicagoland
    I am an evil genius looking for more evil plans to add to my agenda, what more can I say...
  • Options
    In recent discussions about extensions creating tables, it appears to be a no-no in vanilla. Everyone seems to be all for the flat file idea. If the user opts-out, their name could be added to the flat file, and when the mail is sent out, it checks the file and WONT send to those users. Alternatively, it could add all users to the flat file, and remove those that opt-out? I am not sure. Just throwing around a few ideas. I have no experience in this field, s o these are just my thoughts.
  • Options
    just as a pointer it would need to add their email address as usernames can be changed in certain instances.
  • Options
    I have no intention of making this, but I see your point. It would be difficult with a flat file. An extra column would be much easier, but, as others have said, should be out of the question.
  • Options
    lechlech Chicagoland
    edited August 2005
    @nathan:
    The smartest way to pull this off without requiring any extra tables, rows or anything, could be by just hooking an entry into the LUM_Users table under either the Attributes, Discovery, or Settings row. This would eliminate any need for extra tables, rows or files.

    @mini:
    indeed, with the above just said, thas would write that little problem out of the equation. The only thing to do then would be figuring out a way to traverse the LUM_users table in such a way to compile a valid list each time you wish to send an email without hitting the server too hard when building a list of users to email.

    @mark:
    Adding up all of the above, this should be totally possible without any crazy DB rewrites.

    To avoid that little DB rewrite, the user is opted out by default (no entry set), opting in the first time writes the initial entry so the extension could find users to include.
    Lum_Users 'Settings'
    a:9:{ s:13:"ShowBookmarks";i:0; s:21:"JumpToLastReadComment";i:0; s:22:"ShowDeletedDiscussions";i:1; s:19:"ShowDeletedComments";i:1; s:12:"UseQuickKeys";i:1; s:9:"HidePanel";i:0; s:21:"ShowRecentDiscussions";i:0; s:19:"ShowBrowsingHistory";i:1; s:22:"ShowPrivateDiscussions";i:0; <strong>s:666:"EvilMailerInclude";i:1;</strong> }
    if setting 666 is EvilMailerInclude and set to 1, include that user. else if not found or setting 666 is EvilMailerInclude and set to 0, do not include. Possibly as simple as that, no big or small opt-in/out listings, all the data is already there, you just need to know how to use it :D
  • Options
    Thanks lech. I just read the documentation on the creating extensions and user preferences. I can now see how you COULD do this without a flat file or any changes to the database. Thanks agian.
  • Options
    lechlech Chicagoland
    Yeah, just trying to cut out all the totally unecessary hoops for you guys to jump through and thinking ahead so you don't have to. I should really write up an extensions and quit giving people flak :)
  • Options
    The setting should be called "OptOutEvilEmail" then users will get mailed by default, because they only get opted out when the setting is true. So if the setting doesn't exist, they get mailed! Reverse booleans are fun!
  • Options
    lechlech Chicagoland
    David, that's even more evil than the original idea... I love it.
  • Options
    +1 from me. Now why did I (or anybody else) think of that. Simple is always best. BTW: Lech and I must be online at the same times. I always seem to comment right after him. what hell is with that?
  • Options
    You are stalking him?
This discussion has been closed.