Jake Bunce Well-known member Apr 4, 2013 #2 It's in the user record. What is the context? Are you working with a XenForo addon? Or are you talking about a raw PHP script that is separate from XenForo?
It's in the user record. What is the context? Are you working with a XenForo addon? Or are you talking about a raw PHP script that is separate from XenForo?
M Mic Member Apr 4, 2013 #3 Inside my add-on. I found a way to get the value. $userFieldModel = new XenForo_Model_UserField; $values = $userFieldModel->getUserFieldValues($visitor['user_id']); $myValue = $values['my_custom_field_id'];
Inside my add-on. I found a way to get the value. $userFieldModel = new XenForo_Model_UserField; $values = $userFieldModel->getUserFieldValues($visitor['user_id']); $myValue = $values['my_custom_field_id'];
Jeremy in memoriam 1991-2020 Apr 5, 2013 #4 Mic said: Inside my add-on. I found a way to get the value. $userFieldModel = new XenForo_Model_UserField; $values = $userFieldModel->getUserFieldValues($visitor['user_id']); $myValue = $values['my_custom_field_id']; Click to expand... You shouldn't instantiate XenForo_Model_UserField directly. It should be: PHP: XenForo_Model::create('XenForo_Model_UserField');[/quote]
Mic said: Inside my add-on. I found a way to get the value. $userFieldModel = new XenForo_Model_UserField; $values = $userFieldModel->getUserFieldValues($visitor['user_id']); $myValue = $values['my_custom_field_id']; Click to expand... You shouldn't instantiate XenForo_Model_UserField directly. It should be: PHP: XenForo_Model::create('XenForo_Model_UserField');[/quote]