# Problem with login to admin console and events

**URL:** https://community.dreamfactory.com/t/problem-with-login-to-admin-console-and-events/5077
**Category:** Authentication & Security
**Created:** [December 6, 2019, 5:18am UTC](https://community.dreamfactory.com/t/problem-with-login-to-admin-console-and-events/5077 "2019-12-06T05:18:22Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![LuchoRod](https://avatars.discourse-cdn.com/v4/letter/l/50afbb/32.png) [@LuchoRod](https://community.dreamfactory.com/u/LuchoRod)
#### Post date: [December 6, 2019, 5:18am UTC](https://community.dreamfactory.com/t/problem-with-login-to-admin-console-and-events/5077/1 "2019-12-06T05:18:22Z")

</div>

Greetings,

I’ve modified the **event user.session.pre.post** to block empty apikeys and others but my own created apps. The problem is that now i cant even login to DF’s admin console. Is there a way to avoid the pre event or access to the BD and delete it?

Another question: is there a way to block the empty apikeys or those not registered in my DF instance?

Thanks in advance,

Lucho

---

<div class="post-metadata">

### Author: ![pbeverage](https://avatars.discourse-cdn.com/v4/letter/p/34f0e0/32.png) [@pbeverage](https://community.dreamfactory.com/u/pbeverage)
#### Post date: [December 6, 2019, 7:25pm UTC](https://community.dreamfactory.com/t/problem-with-login-to-admin-console-and-events/5077/2 "2019-12-06T19:25:04Z")

</div>

Hello, LuchoRod.

I believe that you can access the database directly, and update the [DREAMFACTORY\_INSTANCE].[dbo].[event\_script] table and set the appropriate event(s) to be disabled:

```
UPDATE [DREAMFACTORY_INSTANCE].[dbo].[event_script]
SET [is_active] = 0
WHERE [name] = 'NAME_OF_YOUR_EVENT_GOES_HERE]

```

You are likely going to need to flush the cache, which might work from the terminal/command line:

```
php artisan config:clear
php artisan cache:clear

```

Let me know if that works for you or not, but it should if the system is designed correctly.

Thanks,

Paul

PS – Make sure to change the SQL Script above as necessary to reflect your SQL Instance.
