Updated table schema to be nullable on some user_infos to enter only geoloc infos

parent d6e2ef7f
Pipeline #10791 passed with stage
in 13 seconds
......@@ -86,9 +86,9 @@ class UserInfo
$query = "CREATE TABLE IF NOT EXISTS " . USER_INFO_DB_TABLE . " (
id INTEGER(11) UNSIGNED NOT NULL AUTO_INCREMENT,
account_id INTEGER(11) UNSIGNED NOT NULL,
firstname VARCHAR(128) NOT NULL,
lastname VARCHAR(128) NOT NULL,
gender enum('male','female') NOT NULL,
firstname VARCHAR(128),
lastname VARCHAR(128),
gender enum('male','female'),
country_code VARCHAR(32),
country_name VARCHAR(512),
subscribe enum('0','1') NOT NULL DEFAULT '0',
......
......@@ -105,7 +105,7 @@ function xmlrpc_create_email_account($method, $args)
//We call this function to set the geoloc if enabled
if (ENABLE_NEW_ACCOUNTS_GEOLOC) {
return update_account_user_info($account->username, $hashed_password, null, null, "unknown", '0', $account->domain, $algo);
return update_account_user_info($account->username, $hashed_password, null, null, null, '0', $account->domain, $algo);
}
return OK;
......@@ -190,7 +190,7 @@ function xmlrpc_create_email_md5_sha256_account($method, $args)
// args needed = [username, ha1, firstname, lastname, gender, subscribe, [domain], [algo]]
//need username + domain
if (ENABLE_NEW_ACCOUNTS_GEOLOC) {
return update_account_user_info($account->username, $md5_hash, null, null, "unknown", '0', $account->domain, MD5);
return update_account_user_info($account->username, $md5_hash, null, null, null, '0', $account->domain, MD5);
}
return OK;
......
......@@ -138,7 +138,7 @@ function xmlrpc_create_phone_account($method, $args)
// args needed = [username, ha1, firstname, lastname, gender, subscribe, [domain], [algo]]
//need username + domain
if (ENABLE_NEW_ACCOUNTS_GEOLOC) {
return update_account_user_info($account->username, $hashed_password, null, null, "unknown", '0', $account->domain, $algo);
return update_account_user_info($account->username, $hashed_password, null, null, null, '0', $account->domain, $algo);
}
return OK;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment