[Rt-commit] r3595 - in RT-Authen-Bitcard: . html/Callbacks/Bitcard/autohandler

trs at bestpractical.com trs at bestpractical.com
Wed Aug 3 15:28:41 EDT 2005


Author: trs
Date: Wed Aug  3 15:28:41 2005
New Revision: 3595

Modified:
   RT-Authen-Bitcard/   (props changed)
   RT-Authen-Bitcard/html/Callbacks/Bitcard/autohandler/Auth
Log:
 r5608 at wintermute:  tom | 2005-08-03 15:28:25 -0400
 * We want to create privileged users
 * Better error reporting


Modified: RT-Authen-Bitcard/html/Callbacks/Bitcard/autohandler/Auth
==============================================================================
--- RT-Authen-Bitcard/html/Callbacks/Bitcard/autohandler/Auth	(original)
+++ RT-Authen-Bitcard/html/Callbacks/Bitcard/autohandler/Auth	Wed Aug  3 15:28:41 2005
@@ -26,19 +26,22 @@
                                   Name => $user->{'username'},
                                   RealName => $user->{'name'},
                                   EmailAddress => $user->{'email'},
+                                  Privileged => 1,
                                 );
           if ( $UserObj->id ) {
               # created the user, now load them as the current user
               $session{'CurrentUser'}->Load($UserObj->id);
 
               # redirect the user to their preference page to add more info
-              # (are we creating privileged or unprivileged users?)
-              #$m->redirect('User/Prefs.html');
+              $m->redirect($RT::WebPath . '/User/Prefs.html');
           }
           else {
               # we couldn't create the user.  abort abort abort!
               delete $session{'CurrentUser'};
-              $m->abort() unless $RT::WebFallbackToInternalAuth;
+              my $qs = $m->comp('/Elements/QueryString',
+                                 Error => loc("Cannot create user: [_1]", $msg));
+              $m->redirect($RT::WebPath . '/?' . $qs);
+              $m->abort();
           }
       }
   } 


More information about the Rt-commit mailing list