Im not sure if im doing the updates on an model correct. I saw in another issue an example, but it is not working and throws me an unknown column __model_name error.
This is what i am doing:
$model = mvc_model('UserMeta'); $userMetaData = $model->find_one_by_verify_token($this->params['token']); if ($userMetaData && $userMetaData->verify_token_valid_until > strtotime('now')) { $userMetaData->verified = 1; $userMetaData->verify_token_valid_until = null; $userMetaData->verify_token = ''; $model->save($userMetaData); }
Weird enough if i unset __model_name and the __id field it is updating the model.
Hi,
Im not sure if im doing the updates on an model correct. I saw in another issue an example, but it is not working and throws me an unknown column __model_name error.
This is what i am doing:
$model = mvc_model('UserMeta'); $userMetaData = $model->find_one_by_verify_token($this->params['token']); if ($userMetaData && $userMetaData->verify_token_valid_until > strtotime('now')) { $userMetaData->verified = 1; $userMetaData->verify_token_valid_until = null; $userMetaData->verify_token = ''; $model->save($userMetaData); }
Weird enough if i unset __model_name and the __id field it is updating the model.