# CakeDC Users - Extend Model

**URL:** <https://discourse.cakephp.org/t/cakedc-users-extend-model/10167>\
**Category:** Need Help\
**Created:** [February 16, 2022, 9:55am UTC](https://discourse.cakephp.org/t/cakedc-users-extend-model/10167 "2022-02-16T09:55:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bgrinter](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/bgrinter/32/1381_2.png) [@bgrinter](https://discourse.cakephp.org/u/bgrinter)\
**Post date:** [February 16, 2022, 9:55am UTC](https://discourse.cakephp.org/t/cakedc-users-extend-model/10167/1 "2022-02-16T09:55:12Z")

</div>

I’m looking to [extend](https://github.com/CakeDC/users/blob/master/Docs/Documentation/Extending-the-Plugin.md#extending-the-model-tableentity) the model in the CakeDC\Users plugin using CakePHP 4.3.5

I have an existing app using Authentication and want to map the CakeDC/Users fields to my existing table so I’m using the CMS app as a sandbox. As a test, I’ve changed the “is\_active” to “active” and now looking to match the columns using accessors & mutators

Got to passing the new table configuration in config/bootstrap.php

```auto
Configure::write('Users.config', ['users']);
Plugin::load('CakeDC/Users', ['routes' => true, 'bootstrap' => true]);

```

and get `Class "Plugin" not found`

This was removed in 4.0 for Application::addPlugin() so I’ve removed that

I have in src/Application.php

```auto
        $this->addPlugin(\CakeDC\Users\Plugin::class);
        Configure::write('Users.config', ['users']);

```

Which as I understand it should load my custom users.php config file which contains

```auto
return [
    'Users.table' => 'MyUsers',
];

```

but I’m getting `Column not found: 1054 Unknown column 'Users.active' in 'where clause'`

Is this the correct approach? What have I missed / misunderstood?

---

<div class="post-metadata">

**Author:** ![bgrinter](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/bgrinter/32/1381_2.png) [@bgrinter](https://discourse.cakephp.org/u/bgrinter)\
**Post date:** [February 16, 2022, 1:33pm UTC](https://discourse.cakephp.org/t/cakedc-users-extend-model/10167/2 "2022-02-16T13:33:04Z")

</div>

sorted in slack

> I see you’ve extended the base UsersTable, changed 1 column in db. But the previous column is used here \> [users/src/Model/Behavior/AuthFinderBehavior.php at 11.next-cake4 · CakeDC/users · GitHub](https://github.com/CakeDC/users/blob/11.next-cake4/src/Model/Behavior/AuthFinderBehavior.php#L32)  
> So you would need to override the finder in your table in order to use is\_active column instead…
