mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
Only remove wrong Nick from profile instead of disabling login
This commit is contained in:
@@ -55,6 +55,10 @@ class Eqslmethods_model extends CI_Model {
|
||||
if ($status == 'Error') {
|
||||
log_message('error', 'eQSL Error for '.$data['user_eqsl_name']);
|
||||
break;
|
||||
} elseif ($status == 'Nick Error') {
|
||||
log_message('error', 'eQSL Nickname-Error for User '.$data['user_eqsl_name'].' with Nickname '.($data['eqslqthnickname'] ?? '').' at station_profile'.($data['eqsl_station_id'] ?? '').' Nickname will be removed!');
|
||||
$this->disable_eqsl_station_id($userid,$data['eqsl_station_id']);
|
||||
break;
|
||||
} elseif ($status == 'Login Error') {
|
||||
log_message('error', 'eQSL Credentials-Error (User, Pass or Nickname) for '.$data['user_eqsl_name'].' Login will be disabled!');
|
||||
$this->disable_eqsl_uid($userid);
|
||||
@@ -300,7 +304,7 @@ class Eqslmethods_model extends CI_Model {
|
||||
} elseif (stristr($result, "No match on APP_EQSL_QTH_NICKNAME")) {
|
||||
$msg = __("eQSL-Nickname doesn't exist at eQSL");
|
||||
$this->session->set_flashdata('warning', $msg);
|
||||
$status = "Login Error";
|
||||
$status = "Nick Error";
|
||||
} elseif (stristr($result, "Bad record: Duplicate")) {
|
||||
$status = "Duplicate";
|
||||
$this->eqsl_mark_sent($qsl['COL_PRIMARY_KEY']);
|
||||
@@ -361,6 +365,13 @@ class Eqslmethods_model extends CI_Model {
|
||||
}
|
||||
}
|
||||
|
||||
function disable_eqsl_station_id($user_id,$station_id) {
|
||||
$sql='update station_profile set eqslqthnickname=null where user_id=? and station_id=?';
|
||||
$bindings=[$userid,$station_id];
|
||||
$this->db->query($sql,$bindings);
|
||||
return;
|
||||
}
|
||||
|
||||
function disable_eqsl_uid($userid) {
|
||||
$sql='update '.$this->config->item('auth_table').' set user_eqsl_password=null, user_eqsl_name=null where user_id=?';
|
||||
$bindings=[$userid];
|
||||
|
||||
Reference in New Issue
Block a user