Fatal error: Class 'UserAttributeKey' not found when trying to get user attributes by handle

Permalink
I have the following bit of code in my custom registration form:

$fn = 'akID[' . UserAttributeKey::getByHandle('first_name')->getAttributeKeyID() . '][value]';


But I am getting the error message:
Fatal error: Class 'UserAttributeKey' not found in...


I tried loading the following, thinking that one of these might contain that class...but no luck...

Loader::library('attribute/controller');
Loader::model('attribute/key');
Loader::model('attribute/value');
Loader::model('attribute/type');
Loader::model('user');

 
nicolechung replied on at Permalink Reply
Loader::model('user_attributes');
RadiantWeb replied on at Permalink Best Answer Reply
RadiantWeb
that would be:

Loader::model('attribute/categories/user');


ChadStrat
ScottC replied on at Permalink Reply
ScottC
added this as best answer, as it is the correct one :)

This website stores cookies on your computer. These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media. To find out more about the cookies we use, see our Privacy Policy.