  
                    





                
                
  
  



<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="de" xml:lang="de">
  <head>
                    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
                                    <title>Kennwort vergessen?</title>
                        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
                <link rel="shortcut icon" href="resources/icons/xwiki/favicon.ico" />
        <link rel="icon" href="resources/icons/xwiki/favicon16.png" type="image/png" />
        <link rel="icon" href="resources/icons/xwiki/favicon.svg" type="image/svg+xml" />
        <link rel="apple-touch-icon" href="resources/icons/xwiki/favicon144.png" />
                <meta http-equiv="Content-Script-Type" content="text/javascript" />
                        <meta http-equiv="imagetoolbar" content="no"/>
                                <link rel="canonical" href="xwiki.XWiki.ResetPassword.html" />
                            <meta name="document" content="XWiki.ResetPassword"/>
    <meta name="wiki" content="xwiki"/>
    <meta name="space" content="XWiki"/>
    <meta name="page" content="ResetPassword"/>
    <meta name="version" content="1.1"/>
    <meta name="restURL" content="/rest/wikis/xwiki/spaces/XWiki/pages/ResetPassword"/>
    <meta name="form_token" content="0yPVOyUMidhQCoKhz1FIaA"/>
                <meta name="gwt:property" content="locale=de" />
                <meta name="revisit-after" content="7 days" />
<meta name="description" content="Kennwort vergessen?" />
<meta name="keywords" content="wiki" />
<meta name="distribution" content="GLOBAL" />
<meta name="rating" content="General" />
<meta name="author" content="Administrator" />
<meta http-equiv="reply-to" content="" />
<meta name="language" content="de" />
<meta name="google-site-verification" content="qE1BFB2hw6qPJgzEuttEuj-GlvC4aWOtFVY4rJKYhWw" />
<link rel="icon" href="attachment/xwiki.XWiki.DefaultSkin.favicon.ico" type="image/x-icon"/>
<link rel="shortcut icon" href="attachment/xwiki.XWiki.DefaultSkin.favicon.ico" type="image/x-icon"/>
<link rel="alternate" type="application/rss+xml" title="Wiki Feed RSS" href="http://ci.bytebang.at/Main/WebRss?xpage=rdf" />
<link rel="alternate" type="application/rss+xml" title="Blog RSS Feed" href="http://ci.bytebang.at/Blog/GlobalBlogRss?xpage=plain" />

                <!-- com.xpn.xwiki.plugin.skinx.LinkExtensionPlugin -->
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
<link href="skins/colibri/style.css?colorTheme=ColorThemes.DefaultColorTheme" rel="stylesheet" type="text/css" media="all" />
<link href="skins/colibri/print.css?colorTheme=ColorThemes.DefaultColorTheme" rel="stylesheet" type="text/css" media="print" />
        <!--[if IE]>
  <link href="skins/colibri/ie-all.css?colorTheme=ColorThemes.DefaultColorTheme" rel="stylesheet" type="text/css" />
<![endif]-->
    <!-- com.xpn.xwiki.plugin.skinx.CssResourceSkinExtensionPlugin -->
  <!-- com.xpn.xwiki.plugin.skinx.CssSkinExtensionPlugin -->
  <!-- com.xpn.xwiki.plugin.skinx.CssSkinFileExtensionPlugin -->

                                                                                                                                                                                                                                                        <!-- com.xpn.xwiki.plugin.skinx.JsResourceSkinExtensionPlugin -->
    <!-- com.xpn.xwiki.plugin.skinx.JsSkinFileExtensionPlugin -->
    <!-- com.xpn.xwiki.plugin.skinx.JsSkinExtensionPlugin -->

<script type="text/javascript" src="resources/js/xwiki/compatibility.js" defer="defer"></script>
<script type="text/javascript" src="resources/js/xwiki/markerScript.js" defer="defer"></script>
<script type="text/javascript">
// <![CDATA[
require.config({
  baseUrl: '/',
    paths: { 'jquery': "resources/js/amd/jquery" },
  map: {
    '*': { 'jquery': 'jQueryNoConflict' },
    'jQueryNoConflict': { 'jquery': 'jquery' }
  }
});
define('jQueryNoConflict', ['jquery'], function($) { $.noConflict(); return $; });
XWiki.webapppath = "";
XWiki.servletpath = "bin/";
XWiki.contextPath = "";
XWiki.mainWiki = "xwiki";
XWiki.currentWiki = "xwiki";
XWiki.currentSpace = "XWiki";
XWiki.currentPage = "ResetPassword";
XWiki.editor = "";
XWiki.viewer = "";
XWiki.contextaction = "export";
XWiki.docisnew = false;
XWiki.docsyntax = "xwiki/2.1";
XWiki.docvariant = "";
XWiki.blacklistedSpaces = [ "Import","Panels","Scheduler","Stats","XAppClasses","XAppSheets","XAppTemplates","XWiki","WatchCode","WatchSheets","XApp","WatchAdmin","Watch","ColorThemes","AnnotationCode" ];
XWiki.hasEdit = false;
XWiki.hasProgramming = false;
XWiki.hasBackupPackImportRights = false;
XWiki.hasRenderer = true;
window.docviewurl = "xwiki.XWiki.ResetPassword.html";
window.docediturl = "http://ci.bytebang.at/bin/edit/XWiki/ResetPassword";
window.docsaveurl = "http://ci.bytebang.at/bin/save/XWiki/ResetPassword";
window.docgeturl = "http://ci.bytebang.at/bin/get/XWiki/ResetPassword";
// ]]>
</script>

  </head>
  <body id="body" class="skin-colibri wiki-xwiki space-XWiki viewbody hidelefthideright">
<div id="xwikimaincontainer">
<div id="xwikimaincontainerinner">

  <div id="menuview">
    <div id="mainmenu" class="layoutsubsection actionmenu">
<div class="gradientfilterIE"></div>
<div class="componentcontainer">
<strong id="xwikimenutitle" class="hidden">Allgemeine Aktionen:</strong>
<div class="rightmenu">
      <div id="tmLogin" class="tmLogin topmenuentry ">
   <a class="tme" href="http://ci.bytebang.at/bin/login/XWiki/XWikiLogin?xredirect=http%3A%2F%2Fci.bytebang.at%2Fbin%2Fexport%2FXWiki%2FResetPassword%3Fformat%3Dhtml%26viewer%3Dcode%26xpage%3Dprint"><strong>Anmelden</strong></a>
  </div>
    <div id="tmRegister" class="tmRegister topmenuentry ">
   <a class="tme" href="http://ci.bytebang.at/bin/register/XWiki/Register"><strong>Registrieren</strong></a>
  </div>
</div>
<div class="leftmenu">
  <div id="tmMainWiki" class="tmMainWiki topmenuentry dropdownmenuentry  hasIcon" onmouseover="showsubmenu(this);" onmouseout="hidesubmenu(this);">
<span class="tme-extensible">
   <a class="tme" href="http://ci.bytebang.at/bin/Main/"><strong>Start</strong></a>
    <span class="menuarrow">&#9660;</span><span class="hidden menucolon">: </span>
</span><span class="submenu hidden">
        <span class="submenuitem "><a href="http://ci.bytebang.at/bin/WikiManager/" id="tmWikiIndex" class="tmWikiIndex">Wiki Verzeichnis</a></span>
      </span></div>
<div class="topmenuentry"><span class="separator">&raquo;</span></div>
  <div id="tmSpace" class="tmSpace topmenuentry hasIcon">
      <span class="tmetype">Bereich: </span><a class="tme hastype" href="http://ci.bytebang.at/bin/XWiki/"><strong>XWiki</strong></a>
  </div>
<div class="topmenuentry"><span class="separator">&raquo;</span></div>
  <div id="tmPage" class="tmPage topmenuentry hasIcon">
      <span class="tmetype">Seite: </span><a class="tme hastype" href="xwiki.XWiki.ResetPassword.html"><strong>ResetPassword</strong></a>
  </div>
</div>
</div>
</div>

  </div>
 <div id="headerglobal" class="layoutsection">
<div class="minwidthd"></div>
  <div id="company">
  <div id="companylogo">
    <a href="http://ci.bytebang.at/bin/Main/" title="Home" rel="home">
    <img src="attachment/xwiki.ColorThemes.DefaultColorTheme.logo.png" alt="Wiki Logo"/>
    </a>
  </div>   </div>   <div id="globallinks">
      <span class="glink" id="headerlanguages">
            <a href="xwiki.XWiki.ResetPassword.html" class="language-default language-current">default</a>
      </span>
  </div>   <div class="clearfloats"></div>
  </div> 

<div class="contenthidelefthideright" id="contentcontainer">
<div id="contentcontainerinner">
<div class="leftsidecolumns">
  <div id="contentcolumn"> 
        <div class="main layoutsubsection">
      <div id="contentmenu" class="actionmenu">
    <div class="gradientfilterIE"></div>
<div class="componentcontainer">
<strong id="xwikicontentmenutitle" class="hidden">Aktionen:</strong>
<div class="rightmenu">
</div>
<div class="leftmenu">
  <div id="tmExport" class="tmExport topmenuentry dropdownmenuentry dropdownnolink " onmouseover="showsubmenu(this);" onmouseout="hidesubmenu(this);">
<span class="tme-extensible">
   <a class="tme"><strong>Exportieren</strong></a>
    <span class="menuarrow">&#9660;</span><span class="hidden menucolon">: </span>
</span><span class="submenu hidden">
    <span class="submenuitem "><a href="xwiki.XWiki.ResetPassword.html" id="tmExportPdf" class="tmExportPdf">Als PDF exportieren</a></span>
    <span class="submenuitem "><a href="http://ci.bytebang.at/bin/export/XWiki/ResetPassword?format=rtf&amp;format=html&amp;viewer=code&amp;xpage=print" id="tmExportRtf" class="tmExportRtf">Als RTF exportieren</a></span>
  <span class="submenuitem "><a href="http://ci.bytebang.at/bin/export/XWiki/ResetPassword?format=html&amp;format=html&amp;viewer=code&amp;xpage=print" id="tmExportHtml" class="tmExportHtml">Als HTML exportieren</a></span>
    </span></div>
  <div id="tmMoreActions" class="tmMoreActions topmenuentry dropdownmenuentry dropdownnolink " onmouseover="showsubmenu(this);" onmouseout="hidesubmenu(this);">
<span class="tme-extensible">
   <a class="tme"><strong>Weitere Aktionen</strong></a>
    <span class="menuarrow">&#9660;</span><span class="hidden menucolon">: </span>
</span><span class="submenu hidden">
  <span class="submenuitem "><a href="xwiki.XWiki.ResetPassword.html" id="tmPrintPreview" class="tmPrintPreview">Druckvorschau</a></span>
  <span class="submenuitem "><a href="xwiki.XWiki.ResetPassword.html" id="tmViewSource" class="tmViewSource">Zeige den Quellcode</a></span>
  </span></div>
  </div>
</div>
    </div>
    <div id="mainContentArea">
  
   <div id="hierarchy">
                              <a href='http://ci.bytebang.at/bin/Main/'>Willkommen bei bytebang</a> <span class='separator'>&#187;</span> <span class='current'>Kennwort vergessen?</span>
                </div>

      <div id="document-title"><h1>Wiki-Quellcode von <a href="xwiki.XWiki.ResetPassword.html">Kennwort vergessen?</a></h1></div>
                    <div id="document-info">
    <div class="xdocLastModification">       Zuletzt geändert von <span class="wikilink"><a href="http://ci.bytebang.at/bin/XWiki/Admin">Administrator</a></span> am 2014/06/29 19:28
    </div>
    <div>
                      <span id="attachmentsshortcut"><a href="xwiki.XWiki.ResetPassword.html">Anhänge</a> <span class="itemCount">(0)</span></span>
               <span class="separator">&#183;</span>         <span id="informationshortcut"><a href="xwiki.XWiki.ResetPassword.html">Information</a></span>
          </div>
    <div class="clearfloats"></div>
  </div>

<div>
  <a href="xwiki.XWiki.ResetPassword.html" id="toggleLineNumbers">Zeilennummern verstecken</a>
                            <textarea readonly="readonly" class="wiki-code" rows="25" cols="80">
 1: {{velocity}}
 2: #**
 3: This page starts the password reset procedure. It works according to the next algorithm:
 4: 1. Display a form requesting the username
 5: 2. When receiving the username via form submission, generate a random verification string which is stored (as a hash) inside a ResetPasswordRequestClass object attached to the user's profile page. If no such object exists, it is created, but an existing object will be reused, meaning that at most one password reset request can be active at a moment.
 6: 3. Send an email to the address configured in the user's profile, containing a link to the second step of the password reset procedure.
 7: 
 8: URL parameters:
 9: 
10: u = user account sent in the form
11: *###
12: ##
13: ##
14: ## The name of the class used for storing password reset verification data.
15: #set ($verifClass = 'XWiki.ResetPasswordRequestClass')
16: #set ($userName = &quot;$!request.get('u')&quot;)
17: #if ($userName == '')## First step, display the form requesting the username
18:   {{translation key=&quot;xe.admin.passwordReset.instructions&quot;/}}
19: 
20:   {{html}}
21:   &lt;form method=&quot;post&quot; action=&quot;&quot; class=&quot;xformInline&quot;&gt;
22:   &lt;div&gt;
23:   &lt;input type=&quot;hidden&quot; name=&quot;form_token&quot; value=&quot;$!{services.csrf.getToken()}&quot; /&gt;
24:   &lt;label for=&quot;u&quot;&gt;$services.localization.render('xe.admin.passwordReset.username.label')&lt;/label&gt; &lt;input type=&quot;text&quot; id=&quot;u&quot; name=&quot;u&quot;/&gt; &lt;span class=&quot;buttonwrapper&quot;&gt;&lt;input type=&quot;submit&quot; value=&quot;$services.localization.render('xe.admin.passwordReset.submit')&quot; class=&quot;button&quot;/&gt;&lt;/span&gt;
25:   &lt;/div&gt;
26:   &lt;/form&gt;
27:   {{/html}}
28: #else## Second step, generate the verification string, store it, and send the email
29:   ## TODO: Once the usernames are not bound to the XWiki space, revisit this code
30:   #if ($userName.indexOf('.') != -1)
31:     #set ($userDoc = $xwiki.getDocumentAsAuthor(${userName}))
32:   #else
33:     #set ($userDoc = $xwiki.getDocumentAsAuthor(&quot;XWiki.${userName}&quot;))
34:   #end
35:   ## Check if the user exists and has a valid email address configured in his profile
36:   #set ($userObj = '')
37:   #set ($userObj = $userDoc.getObject('XWiki.XWikiUsers'))
38:   #if (!$userObj)
39: 
40:     {{warning}}$services.localization.render('xe.admin.passwordReset.error.noUser', [&quot;//${escapetool.xml($userName)}//&quot;]){{/warning}}
41: 
42:   #elseif ($userDoc.getObject('XWiki.LDAPProfileClass'))
43: 
44:     {{warning}}$services.localization.render('xe.admin.passwordReset.error.ldapUser', [&quot;//${escapetool.xml($userName)}//&quot;]){{/warning}}
45: 
46:   #else
47:     #set ($userEmail = $userObj.getProperty('email').value)
48:     #if (&quot;$!userEmail&quot; == '')
49: 
50:       {{error}}{{translation key=&quot;xe.admin.passwordReset.error.noEmail&quot;/}}{{/error}}
51: 
52:     #else
53:       ## Find the object that will hold the verification string
54:       #set ($verifObj = '')
55:       #set ($verifObj = $userDoc.getObject($verifClass, true))
56:       ## Generate a random string
57:       #set ($verifStr = $util.generateRandomString(30))
58:       ## If the class is correctly configured, the string should automatically be stored as a hash
59:       #set ($discard = $verifObj.set('verification', $verifStr))
60:       #set ($discard = $userDoc.saveAsAuthor($services.localization.render('xe.admin.passwordReset.versionComment'), true))
61:       ## Compose the verification URL
62:       #set ($passwordResetURL = $xwiki.getDocument('XWiki.ResetPasswordComplete').getExternalURL('view', &quot;u=${userName}&amp;v=${verifStr}&quot;))
63:       ## Send an email; the variables will be retrieved from the velocity context
64:       #set ($mailResult = $xwiki.mailsender.sendMessageFromTemplate($xwiki.getXWikiPreference('admin_email', &quot;no-reply@${request.serverName}&quot;), $userEmail, $NULL, $NULL, $xcontext.language, 'XWiki.ResetPasswordMailContent', {}))
65:       #if ($mailResult == 0)
66: 
67:         {{info}}$services.localization.render('xe.admin.passwordReset.emailSent', [&quot;${escapetool.h}#$userDoc.display('email', $userObj)${escapetool.h}#&quot;]){{/info}}
68: 
69:       #else
70: 
71:         {{error}}{{translation key=&quot;xe.admin.passwordReset.error.emailFailed&quot;/}}{{/error}}
72: 
73:       #end
74:     #end
75:   #end
76:   [[{{translation key=&quot;xe.admin.passwordReset.error.retry&quot;/}}&gt;&gt;$doc.fullName]] | [[{{translation key=&quot;xe.admin.passwordReset.error.recoverUsername&quot;/}}&gt;&gt;ForgotUsername]] | [[{{translation key=&quot;xe.admin.passwordReset.login&quot;/}}&gt;&gt;path:$xwiki.getURL('XWiki.XWikiLogin', 'login')]]
77: #end
78: ## Clear private variables, so that they cannot be accessed from the rest of the page (comments, panels...)
79: #set ($verifStr = '')
80: #set ($passwordResetURL = '')
81: {{/velocity}}
</textarea>
</div>

    <div class="clearfloats"></div>
  </div>    </div>      </div>
  </div>
<div class="clearfloats"></div>
  </div></div><div id="footerglobal" class="layoutsection">
<div class="minwidth"></div>
<hr/>
  <div id="xwikilicence">(c) 2026,  by bytebang e.U. - <a href="http://www.bytebang.at/About+us/Impressum">Impressum</a> - <a href="http://www.bytebang.at/About+us/PrivacyAndTermsOfUsage">Datenschutz / Nutzungsbedingungen</a></div>
          <div id="xwikiplatformversion">-</div>
<hr/>
</div>

</div></div></body>
</html>


