juks (juks) wrote in changelog,
juks
juks
changelog

[livejournal] r18822: LJSUP-8533 Logging automatic email inval...

Committer: iaskarov
LJSUP-8533 Logging automatic email invalidation
U   trunk/cgi-bin/LJ/User/EmailStatus.pm
Modified: trunk/cgi-bin/LJ/User/EmailStatus.pm
===================================================================
--- trunk/cgi-bin/LJ/User/EmailStatus.pm	2011-04-07 21:06:36 UTC (rev 18821)
+++ trunk/cgi-bin/LJ/User/EmailStatus.pm	2011-04-08 06:29:22 UTC (rev 18822)
@@ -132,10 +132,18 @@
     } else {
         @users = ($params{user});
     }
+    
+    my $system_user = LJ::load_user('system');  
  
     for my $user (@users) {
-       $user->set_prop('email_faulty', $is_disabled);
-       LJ::update_user($user, { 'status' => $is_disabled ? 'T' : 'A' } );
+        $user->set_prop('email_faulty', $is_disabled);
+        
+        my $old_status = $user->{status};
+        my $new_status = $is_disabled ? 'T' : 'A';
+        
+        LJ::update_user($user, { 'status' => $new_status } );
+ 
+        LJ::statushistory_add($user->userid, $system_user->userid, 'email_status', $user->email_raw . ": $old_status -> $new_status");
     }
 }
 

Tags: juks, livejournal, pm
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