You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

UsuarioModel.php 549B

1234567891011121314151617181920212223
  1. <?php
  2. namespace App\Models;
  3. use CodeIgniter\Model;
  4. class UsuarioModel extends Model
  5. {
  6. protected $table = 'usuarios';
  7. protected $primaryKey = 'idusuario';
  8. protected $useAutoIncrement = true;
  9. protected $insertID = 0;
  10. protected $returnType = 'array';
  11. protected $useSoftDeletes = false;
  12. protected $protectFields = true;
  13. protected $allowedFields = [];
  14. public function findByUsername($username)
  15. {
  16. return $this->where('nombreusuario', $username)->first();
  17. }
  18. }