Skip to content

Commit

Permalink
Fixed issue: Changing password not possible when using Postgres
Browse files Browse the repository at this point in the history
When the RDBMS used is PostgreSQL, if user try to change password the action fail, becouse  the password is a bytea fields delivered as stream.
The fix proposed is same that is used into AuthDb core plugin.

Below the references to the version where the bug was found:

Version 2.72.3+171020
  • Loading branch information
jackom83 authored and c-schmitz committed Nov 27, 2017
1 parent f5871e5 commit 8854ee1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion application/controllers/admin/useraction.php
Expand Up @@ -673,7 +673,7 @@ public function personalsettings()
Yii::app()->setFlashMessage(gT("Your new password was not saved because the passwords did not match."),'error');

//Now check if the old password matches the old password saved
} else if($oUserModel->password !== $oldPasswordHash){
} else if( (((gettype($oUserModel->password)=='resource'))?stream_get_contents($oUserModel->password,-1,0):$oUserModel->password) !== $oldPasswordHash){
Yii::app()->setFlashMessage(gT("Your new password was not saved because the old password was wrong."),'error');

//At last if everything worked set the new password
Expand Down

0 comments on commit 8854ee1

Please sign in to comment.