mirror of
https://github.com/magicbug/Cloudlog
synced 2024-11-23 10:08:38 +00:00
Adding support for editing the eQSL credentials
This commit is contained in:
parent
6413b6141d
commit
bc4970fbe4
@ -202,6 +202,18 @@ class User extends CI_Controller {
|
||||
$data['user_lotw_password'] = $q->user_lotw_password;
|
||||
}
|
||||
|
||||
if($this->input->post('user_eqsl_name')) {
|
||||
$data['user_eqsl_name'] = $this->input->post('user_eqsl_name');
|
||||
} else {
|
||||
$data['user_eqsl_name'] = $q->user_eqsl_name;
|
||||
}
|
||||
|
||||
if($this->input->post('user_eqsl_password')) {
|
||||
$data['user_eqsl_password'] = $this->input->post('user_eqsl_password');
|
||||
} else {
|
||||
$data['user_eqsl_password'] = $q->user_eqsl_password;
|
||||
}
|
||||
|
||||
$this->load->view('user/edit', $data);
|
||||
$this->load->view('layout/footer');
|
||||
}
|
||||
|
@ -122,7 +122,8 @@ class User_Model extends CI_Model {
|
||||
'user_firstname' => $fields['user_firstname'],
|
||||
'user_lastname' => $fields['user_lastname'],
|
||||
'user_timezone' => $fields['user_timezone'],
|
||||
'user_lotw_name' => $fields['user_lotw_name']
|
||||
'user_lotw_name' => $fields['user_lotw_name'],
|
||||
'user_eqsl_name' => $fields['user_eqsl_name']
|
||||
);
|
||||
|
||||
// Check to see if the user is allowed to change user levels
|
||||
@ -153,6 +154,11 @@ class User_Model extends CI_Model {
|
||||
$data['user_lotw_password'] = $fields['user_lotw_password'];
|
||||
}
|
||||
|
||||
if($fields['user_eqsl_password'] != NULL)
|
||||
{
|
||||
$data['user_eqsl_password'] = $fields['user_eqsl_password'];
|
||||
}
|
||||
|
||||
// Update the user
|
||||
$this->db->where('user_id', $fields['id']);
|
||||
$this->db->update($this->config->item('auth_table'), $data);
|
||||
|
@ -100,6 +100,21 @@ $this->load->helper('form');
|
||||
<?php } ?>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>eQSL.cc Username</td>
|
||||
<td><input type="text" name="user_eqsl_name" value="<?php if(isset($user_eqsl_name)) { echo $user_eqsl_name; } ?>" />
|
||||
<?php if(isset($usereqslname_error)) { echo "<div class=\"small error\">".$usereqslname_error."</div>"; } ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>eQSL.cc Password</td>
|
||||
<td><input type="password" name="user_eqsl_password" />
|
||||
<?php if(isset($eqslpassword_error)) { echo "<div class=\"small error\">".$eqslpassword_error."</div>"; } else { ?>
|
||||
<div class="small">Leave blank to keep existing password</div></td>
|
||||
<?php } ?>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
<input type="hidden" name="id" value="<?php echo $this->uri->segment(3); ?>" />
|
||||
<div class="actions"><input class="btn primary" type="submit" value="Update profile" /></div>
|
||||
|
Loading…
Reference in New Issue
Block a user