Problem with checkUserGroup()

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
sixbynine
Posts: 93
Joined: 10 Jan 2018, 11:22

Problem with checkUserGroup()

Post by sixbynine » 19 Jun 2018, 20:49

Hello,

There is something strange with the function checkUserGroup().
In a really simple case checkUserGroup($this, 'admin'), it returns false where it should return true.

In my case, the problem is on that line :

https://github.com/aimeos/aimeos-larave ... rt.php#L82

my $user->siteid is int(1)
my $siteid is string(1) "1"

Is this a bug or a misconfiguration?

Thank you very much !

sbn

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: Problem with checkUserGroup()

Post by aimeos » 20 Jun 2018, 07:19

Seems like both should be casted to "string" before comparision. Can you create PR in the https://github.com/aimeos/aimeos-laravel repository for that?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

sixbynine
Posts: 93
Joined: 10 Jan 2018, 11:22

Re: Problem with checkUserGroup()

Post by sixbynine » 20 Jun 2018, 08:53

Ok !
Thank you :)

Post Reply