|
@@ 622-630 (lines=9) @@
|
| 619 |
|
|
| 620 |
|
if ($this->_Author->validate($this->_errors)) { |
| 621 |
|
// Admin changing another profile |
| 622 |
|
if (!$isOwner) { |
| 623 |
|
$entered_password = Symphony::Database()->cleanValue($fields['confirm-change-password']); |
| 624 |
|
|
| 625 |
|
if (!isset($fields['confirm-change-password']) || empty($fields['confirm-change-password'])) { |
| 626 |
|
$this->_errors['confirm-change-password'] = __('Please provide your own password to make changes to this author.'); |
| 627 |
|
} elseif (Cryptography::compare($entered_password, Symphony::Author()->get('password')) !== true) { |
| 628 |
|
$this->_errors['confirm-change-password'] = __('Wrong password, please enter your own password to make changes to this author.'); |
| 629 |
|
} |
| 630 |
|
} |
| 631 |
|
|
| 632 |
|
// Author is changing their password |
| 633 |
|
if (!$authenticated && ($changing_password || $changing_email)) { |
|
@@ 694-702 (lines=9) @@
|
| 691 |
|
return; |
| 692 |
|
} |
| 693 |
|
// Admin changing another profile |
| 694 |
|
if (!$isOwner) { |
| 695 |
|
$entered_password = Symphony::Database()->cleanValue($fields['confirm-change-password']); |
| 696 |
|
|
| 697 |
|
if (!isset($fields['confirm-change-password']) || empty($fields['confirm-change-password'])) { |
| 698 |
|
$this->_errors['confirm-change-password'] = __('Please provide your own password to make changes to this author.'); |
| 699 |
|
} elseif (Cryptography::compare($entered_password, Symphony::Author()->get('password')) !== true) { |
| 700 |
|
$this->_errors['confirm-change-password'] = __('Wrong password, please enter your own password to make changes to this author.'); |
| 701 |
|
} |
| 702 |
|
} |
| 703 |
|
if (is_array($this->_errors) && !empty($this->_errors)) { |
| 704 |
|
$this->pageAlert(__('There were some problems while attempting to save. Please check below for problem fields.'), Alert::ERROR); |
| 705 |
|
return; |