Wiki source code of Forgot username

Last modified by Administrator on 2010/08/19 12:49

Show last authors
1 #set($email = "$!escapetool.sql($!request.get('e'))")
2 #if($email == '')
3 1 $msg.get("xe.admin.passwordreset.forgotusername")
4
5 $msg.get("xe.admin.passwordreset.enteremail")
6 <form method="post" action="">
7 <div><label for="e">$msg.get("xe.admin.passwordreset.email")</label> <input type="text" id="e" name="e"/> <span class="buttonwrapper"><input type="submit" value="$msg.get('xe.admin.passwordreset.retrieve')" class="button"/></span></div>
8 </form>
9 #else
10 #set($results = $xwiki.searchDocuments(", BaseObject obj, StringProperty prop where obj.name = doc.fullName and obj.className = 'XWiki.XWikiUsers' and prop.id.id = obj.id and prop.id.name = 'email' and prop.value = '$email'"))
11 #if($results.size() == 0)
12 $msg.get("xe.admin.passwordreset.noaccountregistered")
13
14 [&#171; $msg.get("xe.admin.passwordreset.differentaddress")>$doc.fullName] | <a href="$xwiki.getURL("XWiki.XWikiLogin", "login", "")">$msg.get("xe.admin.passwordreset.login") &#187;</a>
15 #elseif($results.size() == 1)
16 $msg.get("xe.admin.passwordreset.usernameis") *${xwiki.getDocument($results.get(0)).name}*
17
18 <a href="$xwiki.getURL("XWiki.XWikiLogin", "login", "")">$msg.get("xe.admin.passwordreset.login") &#187;</a>
19 #else
20 $msg.get("xe.admin.passwordreset.multipleusernames")
21 #foreach($item in $results)
22 * *${xwiki.getDocument($item).name}*
23 #end
24
25 <a href="$xwiki.getURL("XWiki.XWikiLogin", "login", "")">$msg.get("xe.admin.passwordreset.login") &#187;</a>
26 #end
27 #end