changelog_bot (changelog_bot) wrote in changelog,
changelog_bot
changelog_bot
changelog

[livejournal] r14768: LJSUP-2276: Events Atom Stream

Committer: ssafronova
LJSUP-2276: Events Atom Stream

U   trunk/cgi-bin/LJ/User.pm
U   trunk/htdocs/changeemail.bml
Modified: trunk/cgi-bin/LJ/User.pm
===================================================================
--- trunk/cgi-bin/LJ/User.pm	2009-01-14 04:47:08 UTC (rev 14767)
+++ trunk/cgi-bin/LJ/User.pm	2009-01-14 10:51:13 UTC (rev 14768)
@@ -3611,6 +3611,8 @@
 
 sub set_visible {
     my $u = shift;
+
+    LJ::run_hooks("account_will_be_visible", $u);
     return $u->set_statusvis('V');
 }
 
@@ -6938,7 +6940,7 @@
 
     # run hooks for modified bits
     if (LJ::are_hooks("modify_caps")) {
-        $res = LJ::run_hook("modify_caps",
+        my @res = LJ::run_hooks("modify_caps",
                             { 'u' => $u,
                               'newcaps' => $newcaps,
                               'oldcaps' => $u->{'caps'},
@@ -6949,7 +6951,9 @@
                           });
 
         # hook should return a status code
-        return undef unless defined $res;
+        foreach my $status (@res) {
+            return undef unless ref $status and defined $status->[0];
+        }
     }
 
     # update user row

Modified: trunk/htdocs/changeemail.bml
===================================================================
--- trunk/htdocs/changeemail.bml	2009-01-14 04:47:08 UTC (rev 14767)
+++ trunk/htdocs/changeemail.bml	2009-01-14 10:51:13 UTC (rev 14768)
@@ -129,7 +129,7 @@
 
         $u->log_event('email_change', { remote => $remote, new => $POST{'email'} });
 
-        LJ::run_hook('post_email_change',
+        LJ::run_hooks('post_email_change',
                      {
                          user     => $u,
                          newemail => $POST{'email'},
@@ -142,7 +142,6 @@
 
         LJ::update_user($u, $tochange);
 
-warn "send email to old address: $old_email";
         # send letter to old email address
         my @date = localtime(time);
         LJ::send_mail({
@@ -162,7 +161,7 @@
                                 datetime          => sprintf("%02d:%02d %02d/%02d/%04d", @date[2,1], $date[3], $date[4]+1, $date[5]+1900),
                               }),
         });
-warn "send email to new address: $POST{'email'}";
+
         # send validation mail
         my $aa = LJ::register_authaction($u->{'userid'}, "validateemail", $POST{'email'});
         LJ::send_mail({

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