summaryrefslogtreecommitdiffstats
path: root/zarb-ml/mageia-sysadm/2011-January/002383.html
blob: 2177c7730a89deb9e132a36cb6e63f25a0e863e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
 <HEAD>
   <TITLE> [Mageia-sysadm] [336] Fix greeting in password reset key mail,	by sending cn to stash
   </TITLE>
   <LINK REL="Index" HREF="index.html" >
   <LINK REL="made" HREF="mailto:mageia-sysadm%40mageia.org?Subject=Re%3A%20%5BMageia-sysadm%5D%20%5B336%5D%20Fix%20greeting%20in%20password%20reset%20key%20mail%2C%0A%09by%20sending%20cn%20to%20stash&In-Reply-To=%3C20110122093825.A4D3342D69%40valstar.mageia.org%3E">
   <META NAME="robots" CONTENT="index,nofollow">
   <META http-equiv="Content-Type" content="text/html; charset=us-ascii">
   <LINK REL="Previous"  HREF="002382.html">
   <LINK REL="Next"  HREF="002384.html">
 </HEAD>
 <BODY BGCOLOR="#ffffff">
   <H1>[Mageia-sysadm] [336] Fix greeting in password reset key mail,	by sending cn to stash</H1>
    <B>root at mageia.org</B> 
    <A HREF="mailto:mageia-sysadm%40mageia.org?Subject=Re%3A%20%5BMageia-sysadm%5D%20%5B336%5D%20Fix%20greeting%20in%20password%20reset%20key%20mail%2C%0A%09by%20sending%20cn%20to%20stash&In-Reply-To=%3C20110122093825.A4D3342D69%40valstar.mageia.org%3E"
       TITLE="[Mageia-sysadm] [336] Fix greeting in password reset key mail,	by sending cn to stash">root at mageia.org
       </A><BR>
    <I>Sat Jan 22 10:38:25 CET 2011</I>
    <P><UL>
        <LI>Previous message: <A HREF="002382.html">[Mageia-sysadm] [335] Dont detach when checking ldap error code, , we want to continue to set a template
</A></li>
        <LI>Next message: <A HREF="002384.html">[Mageia-sysadm] [877] Change ACL for non-privileged users to not work on reset model, instead allow
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#2383">[ date ]</a>
              <a href="thread.html#2383">[ thread ]</a>
              <a href="subject.html#2383">[ subject ]</a>
              <a href="author.html#2383">[ author ]</a>
         </LI>
       </UL>
    <HR>  
<!--beginarticle-->
<PRE>Revision: 336
Author:   buchan
Date:     2011-01-22 10:38:25 +0100 (Sat, 22 Jan 2011)
Log Message:
-----------
Fix greeting in password reset key mail, by sending cn to stash
Also add some more error error checking on the search

Modified Paths:
--------------
    identity/CatDap/trunk/lib/CatDap/Controller/forgot_password.pm

Modified: identity/CatDap/trunk/lib/CatDap/Controller/forgot_password.pm
===================================================================
--- identity/CatDap/trunk/lib/CatDap/Controller/forgot_password.pm	2011-01-22 08:52:05 UTC (rev 335)
+++ identity/CatDap/trunk/lib/CatDap/Controller/forgot_password.pm	2011-01-22 09:38:25 UTC (rev 336)
@@ -56,7 +56,10 @@
 	$emailfilter =~ s/\%s/$email/g,
 	$c-&gt;log-&gt;debug(&quot;Searching for email $email with filter $emailfilter&quot;);
 	my $mesg = $c-&gt;model('Proxy')-&gt;search($emailfilter);
-	if (!$mesg-&gt;entries()) {
+
+	$c-&gt;log-&gt;info(printf(&quot;Search failed: %s&quot;),$mesg-&gt;error)	if ($mesg-&gt;code);
+	my @entries = $mesg-&gt;entries;
+	if (@entries != 1) {
 		push @errors,$c-&gt;loc(
 			'This email address is not bound to an account'
 		);
@@ -86,6 +89,7 @@
 			'template'	=&gt; 'forgot_password.tt',
 		},
 		url =&gt; $c-&gt;uri_for('/forgot_password/confirm') . &quot;?secret=$secret&quot;,
+		cn =&gt; @entries[0]-&gt;cn,
 	);
 
 	$c-&gt;log-&gt;info(&quot;Sending forgot password mail to email address $email&quot;);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: &lt;/pipermail/mageia-sysadm/attachments/20110122/297c6dcb/attachment-0001.html&gt;
</PRE>











<!--endarticle-->
    <HR>
    <P><UL>
        <!--threads-->
	<LI>Previous message: <A HREF="002382.html">[Mageia-sysadm] [335] Dont detach when checking ldap error code, , we want to continue to set a template
</A></li>
	<LI>Next message: <A HREF="002384.html">[Mageia-sysadm] [877] Change ACL for non-privileged users to not work on reset model, instead allow
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#2383">[ date ]</a>
              <a href="thread.html#2383">[ thread ]</a>
              <a href="subject.html#2383">[ subject ]</a>
              <a href="author.html#2383">[ author ]</a>
         </LI>
       </UL>

<hr>
<a href="https://www.mageia.org/mailman/listinfo/mageia-sysadm">More information about the Mageia-sysadm
mailing list</a><br>
</body></html>