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

Refresh Member object before attempting new login #300

Merged
merged 1 commit into from
Oct 23, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/member.symphony.php
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,10 @@ public function filter_UpdatePasswordLogin(array $context) {
// Handle which is the Identity field, either the Member: Username or Member: Email field
$identity = is_null($this->section->getFieldHandle('identity')) ? 'email' : 'identity';

// Re: #299. Refresh the Member Entry object, so the login function can use
// the new password hash for the member's cookie.
$this->Member = $this->fetchMemberFromID($this->getMemberID());

$this->login(array(
$this->section->getFieldHandle($identity) => $context['entry']->getData($this->section->getField($identity)->get('id'), true)->value,
$this->section->getFieldHandle('authentication') => $context['fields'][$this->section->getFieldHandle('authentication')]['password']
Expand Down