if (!empty($_REQUEST['passwordRequest'])) { //|| (strpos($_REQUEST['username'], '@') < 1)) {
return $this->passwordRequest($_REQUEST['passwordRequest']);
}
if (!empty($_REQUEST['passwordRequest'])) { //|| (strpos($_REQUEST['username'], '@') < 1)) {
return $this->passwordRequest($_REQUEST['passwordRequest']);
}
-
- if (!empty($_REQUEST['ResetPassword'])) {
- if (empty($_REQUEST['id']) ||
- empty($_REQUEST['ts']) ||
- empty($_REQUEST['key']) ||
- empty($_REQUEST['password1']) ||
- empty($_REQUEST['password2']) ||
- ($_REQUEST['password1'] != $_REQUEST['password2'])
- ) {
- $this->jerr("Invalid request to reset password");
- }
-
- $this->resetPassword($_REQUEST['id'], $_REQUEST['ts'], $_REQUEST['key'], $_REQUEST['password1'] );
- }
-
-
- if (!empty($_REQUEST['_verifyCheckSum'])) {
- if (empty($_REQUEST['id']) ||
- empty($_REQUEST['ts']) ||
- empty($_REQUEST['key'])
-
- ) {
- $this->jerr("Invalid request to reset password");
- }
-
- $this->verifyResetPassword($_REQUEST['id'], $_REQUEST['ts'], $_REQUEST['key']);
- $this->jok("Checksum is ok");
- }
+
+ if (!empty($_REQUEST['ResetPassword'])) {
+ if (empty($_REQUEST['id']) ||
+ empty($_REQUEST['ts']) ||
+ empty($_REQUEST['key']) ||
+ empty($_REQUEST['password1']) ||
+ empty($_REQUEST['password2']) ||
+ ($_REQUEST['password1'] != $_REQUEST['password2'])
+ ) {
+ $this->jerr("Invalid request to reset password");
+ }
+
+ $this->resetPassword($_REQUEST['id'], $_REQUEST['ts'], $_REQUEST['key'], $_REQUEST['password1'] );
+ }
+
+
+ if (!empty($_REQUEST['_verifyCheckSum'])) {
+ if (empty($_REQUEST['id']) ||
+ empty($_REQUEST['ts']) ||
+ empty($_REQUEST['key'])
+
+ ) {
+ $this->jerr("Invalid request to reset password");
+ }
+
+ $this->verifyResetPassword($_REQUEST['id'], $_REQUEST['ts'], $_REQUEST['key']);
+ $this->jok("Checksum is ok");
+ }
if (!$cm->get('name', 'ADMIN_PASSWORD_RESET')) {
$this->jerr("no template Admin password reset (ADMIN_PASSWORD_RESET) exists - please run importer ");
}
if (!$cm->get('name', 'ADMIN_PASSWORD_RESET')) {
$this->jerr("no template Admin password reset (ADMIN_PASSWORD_RESET) exists - please run importer ");
}
- $mailer = $cm->toMailer($this, false);
- if (is_a($mailer,'PEAR_Error') ) {
- $this->addEvent('SYSERR',false, $mailer->getMessage());
- $this->jerr($mailer->getMessage());
- }
+ $mailer = $cm->toMailer($this, false);
+ if (is_a($mailer,'PEAR_Error') ) {
+ $this->addEvent('SYSERR',false, $mailer->getMessage());
+ $this->jerr($mailer->getMessage());
+ }
- if (is_a($sent,'PEAR_Error') ) {
- $this->addEvent('SYSERR',false, $sent->getMessage());
- $this->jerr($sent->getMessage());
+ if (is_a($sent,'PEAR_Error') ) {
+ $this->addEvent('SYSERR',false, $sent->getMessage());
+ $this->jerr($sent->getMessage());
- $this->jerr("Password change attempted when not logged in");
- }
- $uu = clone($au);
- $au->setPassword($r['passwd1']);
- $au->update($uu);
- $this->addEvent("CHANGEPASS", $au);
- $this->jok($au);
-
+ $this->jerr("Password change attempted when not logged in");
+ }
+ $uu = clone($au);
+ $au->setPassword($r['passwd1']);
+ $au->update($uu);
+ $this->addEvent("CHANGEPASS", $au);
+ $this->jok($au);
+