Skip to content

Commit

Permalink
Merge 4abb95c into bdfbcff
Browse files Browse the repository at this point in the history
  • Loading branch information
wppd committed Sep 15, 2014
2 parents bdfbcff + 4abb95c commit a6268ab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Confide/CacheLoginThrottleService.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,12 @@ public function isThrottled($identity)
*/
protected function parseIdentity($identity)
{
// If is an array, remove password, remember and then
// If is an array, remove password, remember, token and then
// transforms it into a string.
if (is_array($identity)) {
unset($identity['password']);
unset($identity['remember']);
unset($identity['_token']);
$identity = serialize($identity);
}

Expand Down
2 changes: 2 additions & 0 deletions src/views/generators/controller.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ public function {{ (! $restful) ? 'doLogin' : 'postLogin' }}()
if ($repo->login($input)) {
return Redirect::intended('/');
} else {
//please use array_get($input,'username or email')
//or you'll find out the login throttling might not be working
if ($repo->isThrottled($input)) {
$err_msg = Lang::get('confide::confide.alerts.too_many_attempts');
} elseif ($repo->existsButNotConfirmed($input)) {
Expand Down

0 comments on commit a6268ab

Please sign in to comment.