Plugin Directory

Changeset 2498980


Ignore:
Timestamp:
03/18/2021 08:09:57 PM (5 years ago)
Author:
unsproject
Message:

[2.0.1] Fix SRP email issue

Location:
unsproject/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • unsproject/trunk/readme.md

    r2496270 r2498980  
    5555
    5656== Changelog ==
     57
     58= 2.0.1 (18 Mar 2021)
     59* Fix email issue for SRP
     60
    5761= 2.0.0 (15 Mar 2021)
    5862* Add support for SRP
  • unsproject/trunk/src/SrpService.php

    r2496270 r2498980  
    111111     */
    112112    public function doRegisterUserIfNeeded($password, $passwordCheck = true){
    113 //        $passwordCheck = false;
     113        $forceReset = false;
    114114        if (empty($this->srpCredentials)) {
    115115            if (
     
    126126                $this->srpHelper->getSessionValue('v')
    127127            );
     128            $forceReset = true;
    128129        } else {
    129130            $this->srpHelper->setSessionValue('s', $this->srpCredentials['s']);
     
    131132        }
    132133
    133         $this->deletePasswordFromUserTable();
     134        if($forceReset) {
     135            $this->deletePasswordFromUserTable();
     136        }
    134137    }
    135138
  • unsproject/trunk/src/Views/Srp/home.php

    r2496270 r2498980  
    1515$srpCredentials = $databaseService->getSrpCredentials(get_current_user_id());
    1616
    17 if ($srpCredentials !== null && isset($_REQUEST['activate_srp'])) {
    18     $siteOptions->setValue('activate_srp', (int)$_REQUEST['activate_srp']);
    19     $resetPasswordSrpValue = isset($_REQUEST['delete_password_srp'])
     17if ($srpCredentials !== null && isset($_REQUEST['srp_activate_action'])) {
     18    $activate = (int) isset($_REQUEST['activate_srp']);
     19    $siteOptions->setValue('activate_srp',$activate);
     20    $resetPasswordSrpValue = $activate && isset($_REQUEST['delete_password_srp'])
    2021        ? (bool)$_REQUEST['delete_password_srp']
    2122        : false;
     
    117118
    118119            <form method="POST">
     120                <input type="hidden" name="srp_activate_action" />
    119121                <div class="custom-container top-round">
    120122                    <b class="custom-title">Enable SRP</b>
  • unsproject/trunk/unsproject.php

    r2496270 r2498980  
    88    Text Domain: uns-project
    99    Domain Path: /i18n
    10     Version: 2.0.0
     10    Version: 2.0.1
    1111*/
    1212
Note: See TracChangeset for help on using the changeset viewer.