[LON-CAPA-cvs] cvs: loncom /interface loncommon.pm lonpreferences.pm
albertel
lon-capa-cvs-allow@mail.lon-capa.org
Tue, 17 Jul 2007 21:11:53 -0000
albertel Tue Jul 17 17:11:53 2007 EDT
Modified files:
/loncom/interface lonpreferences.pm loncommon.pm
Log:
-flush the chaced emails addresses if updates occur
Index: loncom/interface/lonpreferences.pm
diff -u loncom/interface/lonpreferences.pm:1.108 loncom/interface/lonpreferences.pm:1.109
--- loncom/interface/lonpreferences.pm:1.108 Fri Jul 6 19:17:30 2007
+++ loncom/interface/lonpreferences.pm Tue Jul 17 17:11:49 2007
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Preferences
#
-# $Id: lonpreferences.pm,v 1.108 2007/07/06 23:17:30 www Exp $
+# $Id: lonpreferences.pm,v 1.109 2007/07/17 21:11:49 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -912,6 +912,7 @@
if ($message) {
$message .= '<br /><hr />';
}
+ &Apache::loncommon::flush_email_cache($user,$domain);
&msgforwardchanger($r,$message);
}
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.550 loncom/interface/loncommon.pm:1.551
--- loncom/interface/loncommon.pm:1.550 Tue Jul 17 14:07:18 2007
+++ loncom/interface/loncommon.pm Tue Jul 17 17:11:49 2007
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common routines
#
-# $Id: loncommon.pm,v 1.550 2007/07/17 18:07:18 albertel Exp $
+# $Id: loncommon.pm,v 1.551 2007/07/17 21:11:49 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2156,6 +2156,15 @@
}
}
+sub flush_email_cache {
+ my ($uname,$udom)=@_;
+ if (!$udom) { $udom =$env{'user.domain'}; }
+ if (!$uname) { $uname=$env{'user.name'}; }
+ return if ($udom eq 'public' && $uname eq 'public');
+ my $id=$uname.':'.$udom;
+ &Apache::lonnet::devalidate_cache_new('emailscache',$id);
+}
+
# ------------------------------------------------------------------ Screenname
=pod