[LON-CAPA-cvs] cvs: loncom /interface lonpreferences.pm

raeburn raeburn at source.lon-capa.org
Tue Apr 23 22:00:23 EDT 2019


raeburn		Wed Apr 24 02:00:23 2019 EDT

  Modified files:              
    /loncom/interface	lonpreferences.pm 
  Log:
  - Fix indentation; no code changes.
  
  
Index: loncom/interface/lonpreferences.pm
diff -u loncom/interface/lonpreferences.pm:1.228 loncom/interface/lonpreferences.pm:1.229
--- loncom/interface/lonpreferences.pm:1.228	Wed Apr 24 01:44:30 2019
+++ loncom/interface/lonpreferences.pm	Wed Apr 24 02:00:23 2019
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Preferences
 #
-# $Id: lonpreferences.pm,v 1.228 2019/04/24 01:44:30 raeburn Exp $
+# $Id: lonpreferences.pm,v 1.229 2019/04/24 02:00:23 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1288,42 +1288,42 @@
             $caller = 'preferences';
         }
     } elsif ($caller eq 'reset_by_email') {
-            my %data = &Apache::lonnet::tmpget($mailtoken);
-            if (keys(%data) == 0) {
-                $r->print(
-                    '<p class="LC_warning">'
-                   .&mt('Sorry, the URL you provided to complete the reset of your password was invalid. Either the token included in the URL has been deleted or the URL you provided was invalid. Please submit a [_1]new request[_2] for a password reset, and follow the link to the new URL included in the e-mail that will be sent to you, to allow you to enter a new password.'
-                       ,'<a href="/adm/resetpw">','</a>')
-                   .'</p>'
-                );
-                return;
-            }
-            if (defined($data{time})) {
-                if (time - $data{'time'} < $timelimit) {
-                    $user = $data{'username'};
-                    $domain = $data{'domain'};
-                    $currentpass = $data{'temppasswd'};
-                } else {
-                    $r->print(
-                        '<p class="LC_warning">'
-                       .&mt('Sorry, the token generated when you requested'
-                           .' a password reset has expired.')
-                       .'</p>'
-                    );
-                    return;
-                }
+        my %data = &Apache::lonnet::tmpget($mailtoken);
+        if (keys(%data) == 0) {
+            $r->print(
+                '<p class="LC_warning">'
+               .&mt('Sorry, the URL you provided to complete the reset of your password was invalid. Either the token included in the URL has been deleted or the URL you provided was invalid. Please submit a [_1]new request[_2] for a password reset, and follow the link to the new URL included in the e-mail that will be sent to you, to allow you to enter a new password.'
+                   ,'<a href="/adm/resetpw">','</a>')
+               .'</p>'
+            );
+            return;
+        }
+        if (defined($data{time})) {
+            if (time - $data{'time'} < $timelimit) {
+                $user = $data{'username'};
+                $domain = $data{'domain'};
+                $currentpass = $data{'temppasswd'};
             } else {
                 $r->print(
                     '<p class="LC_warning">'
-                   .&mt('Sorry, the URL generated when you requested reset of'
-                       .' your password contained incomplete information.')
+                   .&mt('Sorry, the token generated when you requested'
+                       .' a password reset has expired.')
                    .'</p>'
                 );
                 return;
             }
-            if (&Apache::lonnet::domain($domain) eq '') {
-                $domain = $r->dir_config('lonDefDomain');
-            }
+         } else {
+            $r->print(
+                '<p class="LC_warning">'
+               .&mt('Sorry, the URL generated when you requested reset of'
+                   .' your password contained incomplete information.')
+               .'</p>'
+            );
+            return;
+        }
+        if (&Apache::lonnet::domain($domain) eq '') {
+            $domain = $r->dir_config('lonDefDomain');
+        }
     } else {
         $r->print(
             '<p class="LC_error">'




More information about the LON-CAPA-cvs mailing list