Hi,
I have the following code …
public function actionSetClientLinkStatus($keycode, $status) {
$status_map = array(
"accept" => "accepted",
"pending" => "pending",
"reject" => "rejected"
);
$client_link = ClientLink::model()->findByAttributes(array("keycode" => md5($keycode)));
$client_link->status = $status_map[$status];
if(!$client_link->save()) echo true;
}
For some reason, it updates the "status" but it keeps setting my "keycode" back to a null value, why is that?
print_r($client_link->attributes) reveals the "keycode" is set correctly.