EgyKit
Member
Hello,
I have a problem deleting entry from a custom table, I get this error
Mysqli statement execute error : Field 'email' doesn't have a default value
These are the table fields structure:
I use this query to delete entries from the table:
Also I want to disable changing user's 'user_state' by disabling the following code in the parent actionContactDetailsSave() function
Is it possible to disable the above code by extending the parent actionContactDetailsSave()?
I have a problem deleting entry from a custom table, I get this error
Mysqli statement execute error : Field 'email' doesn't have a default value
These are the table fields structure:
Code:
email VARCHAR(120) NOT NULL,
emailconfirm_key VARCHAR(16) NOT NULL,
email_type VARCHAR(25) NOT NULL,
email_date INT UNSIGNED NOT NULL,
PRIMARY KEY (email, emailconfirm_key, email_type)
I use this query to delete entries from the table:
Code:
$db = $this->_getDb();
$db->delete('xf_ek_verify_email',
'email = ' . $db->quote($email) . ' AND emailconfirm_key = ' . $db->quote($emailconfirm_key) . ' AND email_type = ' . $db->quote($type)
);
Also I want to disable changing user's 'user_state' by disabling the following code in the parent actionContactDetailsSave() function
PHP:
if ($writer->isChanged('email')
&& XenForo_Application::get('options')->get('registrationSetup', 'emailConfirmation')
&& !$writer->get('is_moderator')
&& !$writer->get('is_admin')
)
{
switch ($writer->get('user_state'))
{
case 'moderated':
case 'email_confirm':
$writer->set('user_state', 'email_confirm');
break;
default:
$writer->set('user_state', 'email_confirm_edit');
}
}
$user = $writer->getMergedData();
if ($writer->isChanged('email')
&& ($user['user_state'] == 'email_confirm_edit' || $user['user_state'] == 'email_confirm')
)
{
$this->getModelFromCache('XenForo_Model_UserConfirmation')->sendEmailConfirmation($user);
return $this->responseMessage(new XenForo_Phrase('your_account_must_be_reconfirmed'));
}
Is it possible to disable the above code by extending the parent actionContactDetailsSave()?