- Posts: 44
- Thank you received: 0
changed user data
14 years 5 months ago #47766
by mohamed
changed user data was created by mohamed
if I loaded the user using
$user = hikashop_loadUser(true);
and then
$user->user_partner_activated = 1;
to activate partner status however the user partnership status is not activated. is there a way to change the attributes of the user object and have them stick
$user = hikashop_loadUser(true);
and then
$user->user_partner_activated = 1;
to activate partner status however the user partnership status is not activated. is there a way to change the attributes of the user object and have them stick
Please Log in or Create an account to join the conversation.
14 years 5 months ago #47923
by nicolas
Replied by nicolas on topic Re: changed user data
That just set the variable in the object of the current page. It doesn't save the information in the database.
For that, you will have to do like that :
$class = hikashop_get('class.user');
$updateObject = null;
$updateObject->user_id = hikashop_loadUser();
$updateObject->user_partner_activated = 1;
$class->save($updateObject);
For that, you will have to do like that :
$class = hikashop_get('class.user');
$updateObject = null;
$updateObject->user_id = hikashop_loadUser();
$updateObject->user_partner_activated = 1;
$class->save($updateObject);
Please Log in or Create an account to join the conversation.
Time to create page: 0.179 seconds