Skip to content

Commit

Permalink
Merge pull request #24 from Spriz/feature/customizeTokenField
Browse files Browse the repository at this point in the history
Allow adjustable token field name
  • Loading branch information
josegonzalez committed Jun 8, 2017
2 parents ee0c7a1 + f9618e9 commit 5963bcc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/Action/ForgotPasswordAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class ForgotPasswordAction extends BaseAction
'scope' => 'entity',
'findConfig' => [],
'findMethod' => 'all',
'tokenField' => 'token',
'messages' => [
'success' => [
'text' => 'A recovery email has been sent successfully'
Expand Down
1 change: 1 addition & 0 deletions src/Action/VerifyAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class VerifyAction extends BaseAction
'enabled' => true,
'scope' => 'entity',
'findMethod' => 'all',
'tokenField' => 'token',
'saveMethod' => 'save',
'relatedModels' => true,
'saveOptions' => [],
Expand Down
2 changes: 1 addition & 1 deletion src/Traits/VerifyTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ protected function _verify($token)
$this->findMethod(),
[
'token' => $token,
'conditions' => [$this->_table()->aliasField('token') => $token]
'conditions' => [$this->_table()->aliasField($this->config('tokenField')) => $token]
]
),
]);
Expand Down

0 comments on commit 5963bcc

Please sign in to comment.