hi all,
just wondering did anyone was able to get last_visit updated without
using this line before call saveField command
$UserModel->data = array();
Based on different suggestions that I found on bakery and some
blogs..I changed the original code to update last_visit column of
users table in othAuth Component to this
$UserModel->id = $row[$this->user_model]['id'];
$row[$this->user_model][$this->user_table_last_visit] = date('Y-m-d
H:i:s');
$res = $UserModel->saveField($this->user_table_last_visit,$row[$this-
>user_model][$this->user_table_last_visit],true);
However, the above saveField commands update all the fields that have
default value and not just only 'last_visit'.
On IRC, gwoo suggested to use $UserModel->data = array() before call
saveField function..and that did the trick..
But I am concern will it break something else..and if not ..why just
saveField is not working..Also on doing some test, I found the problem
is only with othAuth component. If I use the same command from model,
everything works perfectly..
let me know if you think, I might have missed setting some variable in
othAuth component
Regards,
bingo
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---