[Rt-commit] rt branch, 4.4/admin-user-before-create-callback, created. rt-4.4.3-44-g9b943c34c

? sunnavy sunnavy at bestpractical.com
Fri Sep 21 12:13:58 EDT 2018


The branch, 4.4/admin-user-before-create-callback has been created
        at  9b943c34c3170c8de991abdeb1508457b2aa208b (commit)

- Log -----------------------------------------------------------------
commit 9b943c34c3170c8de991abdeb1508457b2aa208b
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Sat Sep 22 00:08:38 2018 +0800

    Add BeforeCreate callback for user admin page
    
    It could be used to massage arguments and also customize fields to pass
    to RT::User::Create

diff --git a/share/html/Admin/Users/Modify.html b/share/html/Admin/Users/Modify.html
index 3b8bc42fc..2b2f37a7f 100644
--- a/share/html/Admin/Users/Modify.html
+++ b/share/html/Admin/Users/Modify.html
@@ -254,6 +254,7 @@ my @fields = qw(Name Comments Signature EmailAddress FreeformContactInfo
 if ($Create) {
     $title = loc("Create a new user");
 } elsif ( defined $id && $id eq 'new') {
+    $m->callback( CallbackName => 'BeforeCreate', ARGSRef => \%ARGS, Fields => \@fields, Results => \@results );
     ( $val, $msg ) = $UserObj->Create(
         (map {($_ => $ARGS{$_})} @fields),
         Privileged => $ARGS{'Privileged'},

-----------------------------------------------------------------------


More information about the rt-commit mailing list