81 lines
2.7 KiB
PHP
81 lines
2.7 KiB
PHP
<?php
|
|
namespace App\Models;
|
|
|
|
use CodeIgniter\Model;
|
|
|
|
class myfitUserProfile extends baseModel
|
|
{
|
|
protected $db;
|
|
public $con_name = 'mermsemr';
|
|
|
|
public function __construct()
|
|
{
|
|
parent::__construct();
|
|
$this->db = \Config\Database::connect($this->con_name);
|
|
}
|
|
|
|
public function accountResetPassword($in)
|
|
{
|
|
return ['msg' => 'Profile Information'];
|
|
}
|
|
|
|
public function getProfileInfo($in)
|
|
{
|
|
return ['msg' => 'Profile Information'];
|
|
}
|
|
|
|
public function resetPassword($in){
|
|
|
|
$session_token= trim($in['session_token']);
|
|
$member_uuid= trim($in['member_uuid']);
|
|
$prev_pass= trim($in['prev_pass']);
|
|
$new_pass= trim($in['new_pass']);
|
|
|
|
/*
|
|
mermsemr_dev=> SELECT * FROM members_session WHERE session ='50534367713329088500408985849250550352404565459882532533221349071826496812546205397231940227378';
|
|
id | member_id | session | loc | created | updated | uuid
|
|
------+-----------+-------------------------------------------------------------------------------------------------+----------------+----------------------------+----------------------------+--------------------------------------
|
|
1317 | 48 | 50534367713329088500408985849250550352404565459882532533221349071826496812546205397231940227378 | 197.210.79.221 | 2023-03-02 08:29:48.075624 | 2023-03-02 08:29:48.075624 | 01d55db5-baff-4f7f-b9e1-266f655facb1
|
|
|
|
|
|
mermsemr_dev=> SELECT id, uuid FROM members limit 2;
|
|
id | uuid
|
|
----+--------------------------------------
|
|
16 | d274dcd9-7f5d-4919-b284-2a0cf137302e
|
|
5 | d59e61db-cc3f-4e80-9f0a-dff324f1a1a0
|
|
(2 rows)
|
|
|
|
mermsemr_dev=> SELECT id, uuid,password FROM members limit 2;
|
|
id | uuid | password
|
|
----+--------------------------------------+----------------------------------
|
|
16 | d274dcd9-7f5d-4919-b284-2a0cf137302e | 1adf598f793670bc7d1d83cbcbb70342
|
|
5 | d59e61db-cc3f-4e80-9f0a-dff324f1a1a0 | 1adf598f793670bc7d1d83cbcbb70342
|
|
(2 rows)
|
|
|
|
mermsemr_dev=>
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
return [
|
|
'status' => '-1',
|
|
'error_msg' => 'Not implemented yet',
|
|
'raw_data' => $in,
|
|
];
|
|
|
|
}
|
|
}
|
|
|
|
/*
|
|
|
|
member_id' => string '16
|
|
' (length=3)
|
|
'session_token' => string '67367112985210631610322406189043063617397600780394987864623852303749094839082445465537892414487
|
|
' (length=96)
|
|
'member_uuid' => string 'd274dcd9-7f5d-4919-b284-2a0cf137302e' (length=36)
|
|
'sessionid' => string '67367112985210631610322406189043063617397600780394987864623852303749094839082445465537892414487
|
|
' (length=96)
|
|
'' => string 'previouspassword' (length=16)
|
|
*/ |