File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 1313use CodeIgniter \Shield \Entities \User ;
1414use CodeIgniter \Shield \Entities \UserIdentity ;
1515use CodeIgniter \Shield \Exceptions \LogicException ;
16+ use CodeIgniter \Shield \Exceptions \ValidationException ;
1617use Faker \Generator ;
1718
1819class UserIdentityModel extends Model
@@ -362,6 +363,26 @@ public function forceGlobalPasswordReset(): void
362363 $ this ->checkQueryReturn ($ return );
363364 }
364365
366+ /**
367+ * Override the Model's `update()` method.
368+ * Throws an Exception when it fails.
369+ *
370+ * @param array|int|string|null $id
371+ * @param array|object|null $data
372+ *
373+ * @return true if the update is successful
374+ *
375+ * @throws ValidationException
376+ */
377+ public function update ($ id = null , $ data = null ): bool
378+ {
379+ $ result = parent ::update ($ id , $ data );
380+
381+ $ this ->checkQueryReturn ($ result );
382+
383+ return true ;
384+ }
385+
365386 public function fake (Generator &$ faker ): UserIdentity
366387 {
367388 return new UserIdentity ([
You can’t perform that action at this time.
0 commit comments