PATCH: User AutoCreation at login (UNTESTED)

Hello!

Finally, here’s a patch for the autohandler which enables
$RT::AutoCreateAuthedUsers; if that’s set and a user has no RT account
but can auth successfully their RT account is autocreated, using
LoadOrCreate() to take advantage of the defaults in
$RT::AutoCreateUserInfo.

Three things:

  1. It has an ugly hack to get the name into the CurrentUser object so
    that external auth methods can take advantage of that info. I’m not
    happy with this, but it’s there for discussion (and expediency, in my
    case). I’d really like guidance/suggestions on how to better
    accomplish this.

  2. Having to call LoadOrCreate() when I know they’re not actually
    going to be loadable really makes me want to drive the defaults in
    $RT::AutoCreateUserInfo all the way into RT::User::Create(). Thoughts?

  3. Have a nice weekend!

–j

p.s. I actually attached this one, Reed! See, I can learn! ;]
Jim Meyer, Geek at Large purp@acm.org

autohandler.autocreate.patch (1.93 KB)