Hello,
I'm on that one for all day, so I'm almost sure it require custom code into autoaction, but let's talk about my problem...
To resume, I would like to have an autoaction that change the content of a cb field depending on a cb field already populated, AND executing differently depending on group of Joomla where the user belongs...
At the moment, it works depending on what's into cb field, but it does not apply depending on groups where users are belonging.
So I have the same results while the 2 types of users are connected, which is not ok.
I don't know how to make understand into autoaction the user group in which the connected users (and viewers of profile) belongs...
Here's my usecase :
I'm trying to setup a kind of dating site.
I have 2 types of users, male, and female.
In cbsub, I've created 2 plans, each plan assign a user to a group : men into "male" group, women into "female" group.
I'm also using cp profile pro, having 4 different profiles :
-Man profile
-Man profile being viewed(by woman)
-Woman profile
-Woman profile being viewed(by woman)
I have setuped 4 autoactions : (in facts I would need 6, but let's keep it simple)
-1 onBeforeUserProfileDisplay to assign a field value (profile type) while a man seing his profile
-1 onBeforeUserProfileDisplay to assign a field value (profile type) while a man is going to watch a woman profile
-1 onBeforeUserProfileDisplay to assign a field value (profile type) while a woman seing his profile
-1 onBeforeUserProfileDisplay to assign a field value (profile type) while a woman is going to watch a man profile
All seems to work fine, while I'm authentified as a man, if I go to:
a woman profile, the profile is being changed, here's the debug lines :string(78) ":: Action 8 :: Access check for 29 failed: looking for 11 in -1, -4, -3, 2, 10" string(78) ":: Action 3 :: Access check for 29 failed: looking for 11 in -1, -4, -3, 2, 10" string(66) ":: Action 7 :: Conditional 1 failed for 29: [gids] Does Contain 10" string(64) ":: Action 4 :: Conditional 1 failed for 29: Male Equal To Female"
FemmesPourHommes
The user himself profile :
string(78) ":: Action 8 :: Access check for 29 failed: looking for 11 in -1, -4, -3, 2, 10" string(78) ":: Action 3 :: Access check for 29 failed: looking for 11 in -1, -4, -3, 2, 10" string(66) ":: Action 7 :: Conditional 1 failed for 29: [gids] Does Contain 10" string(64) ":: Action 4 :: Conditional 1 failed for 29: Male Equal To Female"
But, if I'm authentified as a woman, I don't have the profile changed ! It's like if I was a man (sorry, a bit tired here...)
So as a woman, trying to see the man profile :
string(66) ":: Action 8 :: Conditional 1 failed for 28: [gids] Does Contain 11" string(64) ":: Action 3 :: Conditional 1 failed for 28: Female Equal To Male" string(78) ":: Action 7 :: Access check for 28 failed: looking for 10 in -1, -4, -3, 2, 11" string(78) ":: Action 4 :: Access check for 28 failed: looking for 10 in -1, -4, -3, 2, 11"
As a woman trying to see her proper profile:
string(66) ":: Action 8 :: Conditional 1 failed for 28: [gids] Does Contain 11" string(64) ":: Action 3 :: Conditional 1 failed for 28: Female Equal To Male" string(78) ":: Action 7 :: Access check for 28 failed: looking for 10 in -1, -4, -3, 2, 11" string(78) ":: Action 4 :: Access check for 28 failed: looking for 10 in -1, -4, -3, 2, 11"
FemmesPourHommes