geodesicsolutions-community / geocore-community

GeoCore Community, open source classifieds and auctions software
MIT License
9 stars 6 forks source link

Account Balance Addon needs user id instead of user object #220

Open iBeleave opened 11 months ago

iBeleave commented 11 months ago

Using the account balance addon generates an error (white screen, but stacktrace is in the source):

TypeError: trim(): Argument #1 ($string) must be of type string, geoUser given in ..\classes\php5_classes\User.class.php:96

0 ..\classes\php5_classes\User.class.php(96): trim(Object(geoUser)) 1 ..\classes\php5_classes\User.class.php(173): geoUser::getUser(Object(geoUser)) 2 ..\addons\account_balance\payment_gateways\account_balance.php(450): geoUser::getData(Object(geoUser)) 3 ..\addons\account_balance\payment_gateways\account_balance.php(307): account_balancePaymentGateway->canAddToBalance(Object(geoUser)) ...

canAddToBalance() needs a userid or username, not an object

FIX: addons/account_balance/payment_gateways/account_balance.php ~ line 307