I was reading through the documentation, and it said not to modify the base classes, as it will be over written in the future. (Of which, I understand that.)
However, I want to add data to the actual user. I want to add things like access level, which groups that they moderate, etc.
I tried copying the OSSNUser.php class file to a classes directory in my component, and then registering the class in the com file (like how OSSNGroups does it) but it didn't work.
Is there a way to do this, or hook it, or something? I need to be able to update the data points at key times like user creation, deletion, etc.
Thank you!
Also, I need to know how to hook the user's creation, so that I can add
$user->data->extended_atrrib_1
at the point of user creation, so that when it's checked later it doesn't return an error.
And, how do I check that? do I use
$user->extended_atrrib_1
or
$user->data->extended_atrrib_1
?
Sorry for breaking it up so much, I came back to check to see if I had a response, and found that the system had garbled my message.
Also, I need to know how to hook the user's creation, so that I can add $user->data->extendedatrrib1 at that point, so later, when it's ($user->data->extendedatrrib1) checked, it doesn't return an error.
@Arsalan
Uhm... because I didn't know how to do that? :D
Thank you,
-M.
Not sure why you wanna update the user class as you can add more stuff to user by following as example
$user = ossn_user_by_guid(1); //replace with id
$user->data->extra_attribute_a = 123;
$user->data->extra_attribute_b = 234;
$user->save();
.
Due to the many requests in the past for additonal features and components we have decided to develope a premium version. Features like Hashtags, Videos, Polls, Events, Stories, Link Preview, etc included in it.
$199 (Life Time)