CMXX - Include updated/by on multiple tables and views
This commit is contained in:
@@ -46,6 +46,8 @@ $clause = '';
|
||||
$clause_insert ='';
|
||||
$input_insert = '';
|
||||
|
||||
$post_content['updatedby'] = $username;
|
||||
|
||||
//GET EXISTING USER DATA
|
||||
if ($id != '' && $command != 'reset'){
|
||||
//Define Query
|
||||
@@ -130,9 +132,9 @@ $location_new = (($post_content['location'] != '' && $post_content['location'] !
|
||||
$payload = array('username'=>$user_data['username'], 'exp'=>(time() + 1800));
|
||||
$resetkey = generate_jwt($headers, $payload);
|
||||
//STEP 2- Store resetkey
|
||||
$sql = 'UPDATE users SET resetkey = ? WHERE id = ? '.$whereclause.'';
|
||||
$sql = 'UPDATE users SET resetkey = ?, updatedby = ? WHERE id = ? '.$whereclause.'';
|
||||
$stmt = $pdo->prepare($sql);
|
||||
$stmt->execute([$resetkey,$id]);
|
||||
$stmt->execute([$resetkey,$username,$id]);
|
||||
//STEP 3 - Send to user
|
||||
include_once './assets/mail/email_template_reset.php';
|
||||
send_mail($user_data['email'],$subject,$message,'','');
|
||||
|
||||
Reference in New Issue
Block a user