openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit d47970d5a7eefec6979eb51f40fffdabd929c1d8
parent 525a55cb7adf7f5408b7c90dfa153763175ac42a
Author: Jan Dankert <devnull@localhost>
Date:   Mon, 15 Oct 2012 20:41:11 +0200

Fix: Kennwort vergessen und Registrierfunktion.

Diffstat:
.hgignore | 1+
action/LoginAction.class.php | 24++++++++++++------------
action/LoginAction.ini.php | 2--
themes/default/templates/login/passwordcode.tpl.src.xml | 4++++
themes/default/templates/login/passwordinputcode.tpl.src.xml | 4----
themes/default/templates/login/register.tpl.src.xml | 2+-
themes/default/templates/login/registercode.tpl.src.xml | 50++++++++++++++++++++++++++++++++++++++++++++++++++
themes/default/templates/login/registeruserdata.tpl.src.xml | 50--------------------------------------------------
8 files changed, 68 insertions(+), 69 deletions(-)

diff --git a/.hgignore b/.hgignore @@ -2,3 +2,4 @@ syntax: glob .project .settings +config/config-localhost.ini.php diff --git a/action/LoginAction.class.php b/action/LoginAction.class.php @@ -340,7 +340,7 @@ class LoginAction extends Action exit; } - // Benutzername ist in Eingabemaske unveränderlich + // Benutzername ist in Eingabemaske unver�nderlich $this->setTemplateVar('force_username',$username); } @@ -874,7 +874,7 @@ class LoginAction extends Action // Alle Variablen aus der Sitzung entfernen. session_unset(); - // Damit wird die Session gelöscht, nicht nur die Session-Daten! + // Damit wird die Session gel�scht, nicht nur die Session-Daten! if ( ini_get("session.use_cookies") ) { $params = session_get_cookie_params(); @@ -1069,8 +1069,8 @@ class LoginAction extends Action } else { - // Prüft, ob die übergebene Datenbank-Id mit der - // aktuellen übereinstimmt. + // Pr�ft, ob die �bergebene Datenbank-Id mit der + // aktuellen �bereinstimmt. // Falls nicht, muss ein Re-Login erfolgen. if ( isset($vars[REQ_PARAM_DATABASE_ID]) ) if ( $db->id != $vars[REQ_PARAM_DATABASE_ID] ) @@ -1439,7 +1439,7 @@ class LoginAction extends Action /** * Maske anzeigen, um Benutzer zu registrieren. */ - function registerView() + public function registerView() { } @@ -1449,9 +1449,9 @@ class LoginAction extends Action * Registriercode erzeugen und per E-Mail dem Benutzer mitteilen. * Maske anzeigen, damit Benuter Registriercode anzeigen kann. */ - function registerPost() + public function registercodeView() { - $email_address = $this->getRequestVar('mail','mail'); + $email_address = $this->getRequestVar('mail',OR_FILTER_MAIL); if ( ! Mail::checkAddress($email_address) ) { @@ -1485,7 +1485,7 @@ class LoginAction extends Action - function registeruserdataView() + function registerxxxxPost() { global $conf; @@ -1511,7 +1511,7 @@ class LoginAction extends Action * Benutzerregistierung. * Benutzer hat Best?tigungscode erhalten und eingegeben. */ - function registeruserdataPost() + function registercodePost() { global $conf; $this->checkForDb(); @@ -1676,7 +1676,7 @@ class LoginAction extends Action } $this->setSessionVar("password_commit_name",$user->name); - $this->nextView('passwordinputcode'); + $this->nextView('passwordcode'); } @@ -1685,7 +1685,7 @@ class LoginAction extends Action * Anzeige Formular zum Eingeben des Kennwort-Codes. * */ - function passwordinputcodeView() + function passwordcodeView() { } @@ -1694,7 +1694,7 @@ class LoginAction extends Action /** * Neues Kennwort erzeugen und dem Benutzer zusenden. */ - function passwordinputcodePost() + function passwordcodePost() { $username = $this->getSessionVar("password_commit_name"); diff --git a/action/LoginAction.ini.php b/action/LoginAction.ini.php @@ -51,7 +51,6 @@ guest=true [password] menu=login -target=passwordcode guest=true [passwordcode] @@ -60,7 +59,6 @@ goto=passwordinputcode [passwordinputcode] menu=login -target=passwordcommit guest=true [passwordcommit] diff --git a/themes/default/templates/login/passwordcode.tpl.src.xml b/themes/default/templates/login/passwordcode.tpl.src.xml @@ -0,0 +1,3 @@ +<output xmlns="http://www.openrat.de/template" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.openrat.de/template ../template.xsd"><dummy><form target="_top"><window name="password" icon="user" width="400px" widths="50%,50%"><row><column class="logo" colspan="2"><logo name="password"></logo></column><row><column><text text="mail_code"></text></column><column><input type="text" name="code" size="30"></input></column></row><row><column colspan="2" class="act"><button type="ok"></button></column></row></row></window></form><focus field="code"></focus></dummy></output>+ \ No newline at end of file diff --git a/themes/default/templates/login/passwordinputcode.tpl.src.xml b/themes/default/templates/login/passwordinputcode.tpl.src.xml @@ -1,3 +0,0 @@ -<output xmlns="http://www.openrat.de/template" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://www.openrat.de/template ../template.xsd"><dummy><form target="_top"><window name="password" icon="user" width="400px" widths="50%,50%"><row><column class="logo" colspan="2"><logo name="password"></logo></column><row><column><text text="mail_code"></text></column><column><input type="text" name="code" size="30"></input></column></row><row><column colspan="2" class="act"><button type="ok"></button></column></row></row></window></form><focus field="code"></focus></dummy></output>- \ No newline at end of file diff --git a/themes/default/templates/login/register.tpl.src.xml b/themes/default/templates/login/register.tpl.src.xml @@ -1,6 +1,6 @@ <output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openrat.de/template ../template.xsd"> - <form> + <form method="GET"> <logo name="register"></logo> <part class="line"> diff --git a/themes/default/templates/login/registercode.tpl.src.xml b/themes/default/templates/login/registercode.tpl.src.xml @@ -0,0 +1,49 @@ +<output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.openrat.de/template ../template.xsd"> + <form> + <logo name="register"></logo> + + + <part class="line"> + <part class="label"> + <text text="USER_REGISTER_CODE"></text> + </part> + <part class="input"> + <input name="code" default="" size="25" class="focus"></input> + </part> + </part> + + + + + <part class="line"> + <part class="label"> + <text text="USER_USERNAME"></text> + </part> + <part class="input"> + <input type="text" name="username" value="" size="25"></input> + </part> + </part> + + + <part class="line"> + <part class="label"> + <text text="USER_PASSWORD"></text> + </part> + <part class="input"> + <password name="password" default="" size="25"></password> + </part> + </part> + + + <part class="line"> + <part class="label"> + <text text="GLOBAL_DATABASE"></text> + </part> + <part class="input"> + <selectbox name="dbid" list="dbids" default="actdbid"></selectbox> + </part> + </part> + + </form> +</output>+ \ No newline at end of file diff --git a/themes/default/templates/login/registeruserdata.tpl.src.xml b/themes/default/templates/login/registeruserdata.tpl.src.xml @@ -1,49 +0,0 @@ -<output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://www.openrat.de/template ../template.xsd"> - <form> - <logo name="register"></logo> - - - <part class="line"> - <part class="label"> - <text text="USER_REGISTER_CODE"></text> - </part> - <part class="input"> - <input name="code" default="" size="25" class="focus"></input> - </part> - </part> - - - - - <part class="line"> - <part class="label"> - <text text="USER_USERNAME"></text> - </part> - <part class="input"> - <input type="text" name="username" value="" size="25"></input> - </part> - </part> - - - <part class="line"> - <part class="label"> - <text text="USER_PASSWORD"></text> - </part> - <part class="input"> - <password name="password" default="" size="25"></password> - </part> - </part> - - - <part class="line"> - <part class="label"> - <text text="GLOBAL_DATABASE"></text> - </part> - <part class="input"> - <selectbox name="dbid" list="dbids" default="actdbid"></selectbox> - </part> - </part> - - </form> -</output>- \ No newline at end of file