|
@@ 747-755 (lines=9) @@
|
| 744 |
|
|
| 745 |
|
if (empty($this->_errors) && $this->_Author->validate($this->_errors)) { |
| 746 |
|
// Admin changing another profile |
| 747 |
|
if (!$isOwner) { |
| 748 |
|
$entered_password = Symphony::Database()->cleanValue($fields['confirm-change-password']); |
| 749 |
|
|
| 750 |
|
if (!isset($fields['confirm-change-password']) || empty($fields['confirm-change-password'])) { |
| 751 |
|
$this->_errors['confirm-change-password'] = __('Please provide your own password to make changes to this author.'); |
| 752 |
|
} elseif (Cryptography::compare($entered_password, Symphony::Author()->get('password')) !== true) { |
| 753 |
|
$this->_errors['confirm-change-password'] = __('Wrong password, please enter your own password to make changes to this author.'); |
| 754 |
|
} |
| 755 |
|
} |
| 756 |
|
|
| 757 |
|
// Author is changing their password |
| 758 |
|
if (!$authenticated && ($changing_password || $changing_email)) { |
|
@@ 832-840 (lines=9) @@
|
| 829 |
|
return; |
| 830 |
|
} |
| 831 |
|
// Admin changing another profile |
| 832 |
|
if (!$isOwner) { |
| 833 |
|
$entered_password = Symphony::Database()->cleanValue($fields['confirm-change-password']); |
| 834 |
|
|
| 835 |
|
if (!isset($fields['confirm-change-password']) || empty($fields['confirm-change-password'])) { |
| 836 |
|
$this->_errors['confirm-change-password'] = __('Please provide your own password to make changes to this author.'); |
| 837 |
|
} elseif (Cryptography::compare($entered_password, Symphony::Author()->get('password')) !== true) { |
| 838 |
|
$this->_errors['confirm-change-password'] = __('Wrong password, please enter your own password to make changes to this author.'); |
| 839 |
|
} |
| 840 |
|
} |
| 841 |
|
if (is_array($this->_errors) && !empty($this->_errors)) { |
| 842 |
|
$this->pageAlert(__('There were some problems while attempting to save. Please check below for problem fields.'), Alert::ERROR); |
| 843 |
|
return; |