Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Permanent Users Change Password issue #17

Closed
vietdungiitb opened this issue Sep 9, 2022 · 1 comment
Closed

Permanent Users Change Password issue #17

vietdungiitb opened this issue Sep 9, 2022 · 1 comment

Comments

@vietdungiitb
Copy link

image
Please help, the "Password Manager" win form can not be submitted. The loading window runs forever... I do not know how to fix it
Thanks...

@vietdungiitb
Copy link
Author

it is fixed by set comment to: unset($req_d);
public function changePassword(){

	$user = $this->_ap_right_check();
    if(!$user){
        return;
    }

	$req_d      = $this->request->getData();
    //unset($req_d);

    //Set the date and time
    $extDateSelects = [
            'from_date',
            'to_date'
    ];
    foreach($extDateSelects as $d){
        if(isset($req_d[$d])){
            $newDate = date_create_from_format('m/d/Y', $req_d[$d]);
            $req_d[$d] = $newDate;
        }  
    }

    $entity = $this->{$this->main_model}->get($req_d['user_id']);
    unset($req_d['user_id']);

    $this->{$this->main_model}->patchEntity($entity, $req_d);

    if ($this->{$this->main_model}->save($entity)) {
        $this->set(array(
            'success' => true,
            '_serialize' => array('success')
        ));
    } else {
        $message = __('Could not change password');
        $this->JsonErrors->entityErros($entity,$message);
    }           
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant