Hi @all,
why can i not save date()? Everything is saved, but not the date()!
public function saveSuccessLogin($user){
$successLogin = new SuccessLogins();
$successLogin->usersId = $user->id;
$successLogin->ipAddress = $this->request->getClientAddress();
$successLogin->userAgent = $this->request->getUserAgent();
$successLogin->userAttempted = date("Y-d-m H:i:s");
if (!$successLogin->save()) {
$messages = $successLogin->getMessages();
throw new Exception($messages[0]);
}
}
Mysql structure table:
userAttempted -> datetime 0000-00-00 00:00:00
Rgds
Stefan