Skip to content

Commit

Permalink
Fixed issue #6886: Admin password re-set after language changed and u…
Browse files Browse the repository at this point in the history
…sing Postgres
  • Loading branch information
c-schmitz committed Nov 16, 2012
1 parent efc71f4 commit ea97656
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion application/models/User.php
Expand Up @@ -154,7 +154,16 @@ public static function insertUser($new_user, $new_pass,$new_full_name,$parent_us
}
}


public function beforeSave()
{
// Postgres delivers bytea fields as streams :-o - if this is not done it looks like Postgres saves something unexpected
if (gettype($this->password)=='resource')
{
$this->password=stream_get_contents($this->password);
}
}


/**
* Delete user
*
Expand Down

0 comments on commit ea97656

Please sign in to comment.