diff --git a/application/models/User.php b/application/models/User.php index 5d5c1573e0c..2b6118151b8 100644 --- a/application/models/User.php +++ b/application/models/User.php @@ -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 *