|
@@ 644-652 (lines=9) @@
|
| 641 |
|
|
| 642 |
|
if ($this->_Author->validate($this->_errors)) { |
| 643 |
|
// Admin changing another profile |
| 644 |
|
if (!$isOwner) { |
| 645 |
|
$entered_password = Symphony::Database()->cleanValue($fields['confirm-change-password']); |
| 646 |
|
|
| 647 |
|
if (!isset($fields['confirm-change-password']) || empty($fields['confirm-change-password'])) { |
| 648 |
|
$this->_errors['confirm-change-password'] = __('Please provide your own password to make changes to this author.'); |
| 649 |
|
} elseif (Cryptography::compare($entered_password, Symphony::Author()->get('password')) !== true) { |
| 650 |
|
$this->_errors['confirm-change-password'] = __('Wrong password, please enter your own password to make changes to this author.'); |
| 651 |
|
} |
| 652 |
|
} |
| 653 |
|
|
| 654 |
|
// Author is changing their password |
| 655 |
|
if (!$authenticated && ($changing_password || $changing_email)) { |
|
@@ 715-723 (lines=9) @@
|
| 712 |
|
return; |
| 713 |
|
} |
| 714 |
|
// Admin changing another profile |
| 715 |
|
if (!$isOwner) { |
| 716 |
|
$entered_password = Symphony::Database()->cleanValue($fields['confirm-change-password']); |
| 717 |
|
|
| 718 |
|
if (!isset($fields['confirm-change-password']) || empty($fields['confirm-change-password'])) { |
| 719 |
|
$this->_errors['confirm-change-password'] = __('Please provide your own password to make changes to this author.'); |
| 720 |
|
} elseif (Cryptography::compare($entered_password, Symphony::Author()->get('password')) !== true) { |
| 721 |
|
$this->_errors['confirm-change-password'] = __('Wrong password, please enter your own password to make changes to this author.'); |
| 722 |
|
} |
| 723 |
|
} |
| 724 |
|
if (is_array($this->_errors) && !empty($this->_errors)) { |
| 725 |
|
$this->pageAlert(__('There were some problems while attempting to save. Please check below for problem fields.'), Alert::ERROR); |
| 726 |
|
return; |