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 22, 2012
1 parent 18100d1 commit eabff36
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion application/core/UserIdentity.php
Expand Up @@ -35,7 +35,7 @@ public function authenticate($sOneTimePassword='')
{
if (gettype($user->password)=='resource')
{
$sStoredPassword=stream_get_contents($user->password); // Postgres delivers bytea fields as streams :-o
$sStoredPassword=stream_get_contents($user->password,-1,0); // Postgres delivers bytea fields as streams :-o
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion application/models/User.php
Expand Up @@ -168,7 +168,7 @@ 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);
$this->password=stream_get_contents($this->password,-1,0);
}

return parent::beforeSave();
Expand Down

0 comments on commit eabff36

Please sign in to comment.