/var/www/vhosts/ihelp.ro/_OLD/src/Model/Entity
Edit: /var/www/vhosts/ihelp.ro/_OLD/src/Model/Entity/User.php (2121B)
true,
'role_id' => true,
'email' => true,
'password' => true,
'accept_gdpr' => true,
'is_active' => true,
'created' => true,
'modified' => true,
'role' => true,
'causes' => true,
'messages' => true,
'orders' => true,
'payment_logs' => true,
'product_favorites' => true,
'products' => true,
'profiles' => true,
];
/**
* Fields that are excluded from JSON versions of the entity.
*
* @var array
*/
protected $_hidden = [
'password',
];
// Add this method
protected function _setPassword(string $password): ?string
{
if (strlen($password) > 0) {
return (new DefaultPasswordHasher())->hash($password);
}
}
}