Pat Gunn (dachte) wrote,
Pat Gunn

Soot Storm

Ash is kind of like soot, eh?I finished tonight's BLOG hacking, and now user accounts happen throughthe database instead of through email. It should be easier than ever tomake a new account, so if you lack one, now's a fine time to make one.For the geeks:I extended the person table with a validated attribute, updated all existingentries so validated is true, and then made the field not null. I then alteredthe new user form to submit via a POST instead of by email, and added a handlerto catch the new POST at the appropriate URL. The handler spits out what itgets, and for every field that can be present and is allowed to be set by theuser, if it is, it chunks it into a SQL string to insert a new person into theperson table, with the validated flag set to false. I finally modified myauthentication code to only let people in with the validated flag set true(and, na klar, with the right password). Finally, I wrote a little seperatescript that runs via cron every day that checks for the presence of nonvalidatedpeople and if present, it nags me. Pretty simple.

Tags: blog

  • Still alive

    Been feeling a bit nostalgic. Not about to return to LiveJournal - their new ownership is unfortunate, but I wanted to briefly note what's been up…

  • Unplugging LJ

    It's about time I pulled the plug on the LJ version of my blog: 1) I'm much more active on G+ than I am with general blogging. I post many times a…

  • Mutual Trust

    I don't know which should be considered more remarkable: That a cat should trust a member of a far larger and stronger species that it can't…

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded