This commit is contained in:
Jaybe
2025-03-05 14:02:29 +09:00
commit 247a7808d3
357 changed files with 161196 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
<?php
namespace App\Models\Api;
use CodeIgniter\Shield\Models\UserIdentityModel as ShieldUserIdentityModelModel;
class IdentityModel extends ShieldUserIdentityModelModel
{
protected $allowedFields = [
'user_id',
'type',
'name',
'secret',
'secret2',
'expires',
'extra',
'force_reset',
'password_changed_at',
'last_used_at',
];
public function setPasswordChangedAt($id, $date)
{
$this->db->transStart();
$builder = $this->db->table('auth_identities');
$builder->set('password_changed_at', $date);
$builder->where('user_id', $id);
$builder->where('type', 'email_password');
$builder->update();
$result = $this->db->transComplete();
return $result;
}
}