Closed (fixed)
Project:
HybridAuth Social Login
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
10 Oct 2012 at 10:23 UTC
Updated:
10 Oct 2012 at 10:54 UTC
I try to load info from FB to user account. But in fields display token. For example, in name's field show - [user:hybridauth:firstName].
My rules:
{ "rules_change_user_info_hybrid_" : {
"LABEL" : "Change user info (Hybrid)",
"PLUGIN" : "reaction rule",
"REQUIRES" : [ "hybridauth", "rules" ],
"ON" : [ "user_presave" ],
"IF" : [
{ "hybridauth_user_created_hybridauth" : { "account" : [ "account" ] } },
{ "data_is" : {
"data" : [ "account-unchanged:field-choose-your-account" ],
"value" : "1"
}
}
],
"DO" : [
{ "data_set" : {
"data" : [ "account:field-user-first-name" ],
"value" : "[user:hybridauth:firstName]"
}
},
{ "data_set" : {
"data" : [ "account:field-user-last-name" ],
"value" : "[user:hybridauth:lastName]"
}
},
{ "hybridauth_url_managed_file" : {
"USING" : {
"url" : "[user:hybridauth:photoURL]",
"directory" : "\/sites\/default\/files\/hybridauth-images"
},
"PROVIDE" : { "file" : { "image_file" : "Managed file entity" } }
}
},
{ "data_set" : {
"data" : [ "account:field-user-image" ],
"value" : [ "image-file:owner:field-user-image" ]
}
}
]
}
}
Thanks
Comments
Comment #1
duozerskTry smth similar to this, it works:
Thanks
AndyB
Comment #2
q2_faith commentedThanks a lot)
Comment #2.0
q2_faith commentedadded code tags