wisest owl (wisest_owl) wrote in changelog,
wisest owl
wisest_owl
changelog

[ljcom] r11467: LJSUP-11080: Collecting user's registrat...

Committer: gprochaev
LJSUP-11080: Collecting user's registration data

U   trunk/cgi-bin/LJ/Hooks/Userinfo.pm
Modified: trunk/cgi-bin/LJ/Hooks/Userinfo.pm
===================================================================
--- trunk/cgi-bin/LJ/Hooks/Userinfo.pm	2012-02-10 14:31:54 UTC (rev 11466)
+++ trunk/cgi-bin/LJ/Hooks/Userinfo.pm	2012-02-13 12:48:28 UTC (rev 11467)
@@ -3,6 +3,24 @@
 
 use LJ::WishList;
 
+LJ::register_hook("post_create", sub {
+    my $args = shift;
+
+    my $sclient = LJ::theschwartz();
+    my $u = LJ::load_user ($args->{'user'});
+
+    $sclient->insert( TheSchwartz::Job->new(
+        'funcname' => 'TheSchwartz::Worker::CollectUserInfoData',
+        'arg'      => {
+            'username'  => $u->username,
+            'user_ip'   => LJ::get_remote_ip(),
+            'uniq'      => LJ::UniqCookie->current_uniq,
+            'email'     => $args->{'email'},
+            'ua'        => LJ::Request->header_in ('User-Agent'),
+        },
+    ) ) if $u;		
+});
+
 LJ::register_hook("userinfo_rows", sub {
     my $args = shift;
     my $u = $args->{'u'};

Tags: gprochaev, ljcom, pm, wisest-owl
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments