Permalink
Browse files

Add error checking to reset_password()

  • Loading branch information...
1 parent fe47a63 commit bbf38b673670a64984ebbaa37aa83d57465dbf3c @Militis committed May 1, 2012
Showing with 7 additions and 0 deletions.
  1. +7 −0 models/ion_auth_model.php
@@ -468,6 +468,13 @@ public function reset_password($identity, $new) {
->where($this->identity_column, $identity)
->limit(1)
->get($this->tables['users']);
+
+ if ($query->num_rows() !== 1)
+ {
+ $this->trigger_events(array('post_change_password', 'post_change_password_unsuccessful'));
+ $this->set_error('password_change_unsuccessful');
+ return FALSE;
+ }
$result = $query->row();

0 comments on commit bbf38b6

Please sign in to comment.