# User Login and Activity History?

**URL:** <https://forum.getkirby.com/t/user-login-and-activity-history/27926>\
**Category:** Questions\
**Tags:** v3\
**Created:** [February 22, 2023, 6:53am UTC](https://forum.getkirby.com/t/user-login-and-activity-history/27926 "2023-02-22T06:53:55Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wamb](https://avatars.discourse-cdn.com/v4/letter/w/898d66/32.png) [@Wamb](https://forum.getkirby.com/u/Wamb)\
**Post date:** [February 22, 2023, 6:53am UTC](https://forum.getkirby.com/t/user-login-and-activity-history/27926/1 "2023-02-22T06:53:55Z")

</div>

Is there already a way to track users and their activities and display them in the panel?

Or can someone provide me with a solution?

---

<div class="post-metadata">

**Author:** ![jimbobrjames](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jimbobrjames/32/5802_2.png) [@jimbobrjames](https://forum.getkirby.com/u/jimbobrjames)\
**Post date:** [February 22, 2023, 11:50am UTC](https://forum.getkirby.com/t/user-login-and-activity-history/27926/2 "2023-02-22T11:50:34Z")

</div>

> **[GitHub - michnhokn/kirby3-logger: Add a logger to your Kirby3 website](https://github.com/michnhokn/kirby3-logger)**
>
> Add a logger to your Kirby3 website. Contribute to michnhokn/kirby3-logger development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![Wamb](https://avatars.discourse-cdn.com/v4/letter/w/898d66/32.png) [@Wamb](https://forum.getkirby.com/u/Wamb)\
**Post date:** [February 22, 2023, 12:10pm UTC](https://forum.getkirby.com/t/user-login-and-activity-history/27926/3 "2023-02-22T12:10:38Z")

</div>

Many thanks, I have installed it and made a few changes to the content of the website. Unfortunately, there is no log entry to be found.

---

<div class="post-metadata">

**Author:** ![jimbobrjames](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jimbobrjames/32/5802_2.png) [@jimbobrjames](https://forum.getkirby.com/u/jimbobrjames)\
**Post date:** [February 22, 2023, 12:21pm UTC](https://forum.getkirby.com/t/user-login-and-activity-history/27926/4 "2023-02-22T12:21:56Z")

</div>

Hmm, it probably needs an update to account for the way the Kirby panel works now. It would be best to log an issue on the github repository if there isnt one there already.

---

<div class="post-metadata">

**Author:** ![Wamb](https://avatars.discourse-cdn.com/v4/letter/w/898d66/32.png) [@Wamb](https://forum.getkirby.com/u/Wamb)\
**Post date:** [February 22, 2023, 12:29pm UTC](https://forum.getkirby.com/t/user-login-and-activity-history/27926/5 "2023-02-22T12:29:35Z")

</div>

gh issue: [Nothing showing · Issue #4 · michnhokn/kirby3-logger · GitHub](https://github.com/michnhokn/kirby3-logger/issues/4)

I suspect that it will not be developed any further. It has been 2 years since the last commit on Nov 13, 2021.

Maybe Texnix can update their Kirby Logger plugin. Her last commit was on Apr 21, 2018.

> **[GitHub - texnixe/kirby-logger](https://github.com/texnixe/kirby-logger)**
>
> Contribute to texnixe/kirby-logger development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [February 22, 2023, 1:16pm UTC](https://forum.getkirby.com/t/user-login-and-activity-history/27926/6 "2023-02-22T13:16:40Z")

</div>

> [@Wamb](#):
>
> Maybe Texnix can update their Kirby Logger plugin.

That plugin was developed for Kirby 2, so it cannot just be updated, I would have to create a new plugin. Since other people had taken over in the meantime, there was no reason to.

---

<div class="post-metadata">

**Author:** ![Wamb](https://avatars.discourse-cdn.com/v4/letter/w/898d66/32.png) [@Wamb](https://forum.getkirby.com/u/Wamb)\
**Post date:** [February 22, 2023, 1:24pm UTC](https://forum.getkirby.com/t/user-login-and-activity-history/27926/7 "2023-02-22T13:24:46Z")

</div>

> [@texnixe](#):
>
> That plugin was developed for Kirby 2, so it cannot just be updated, I would have to create a new plugin. Since other people had taken over in the meantime, there was no reason to.

Would it be possible to take up the idea again or integrate it into Kirby as a core function?

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [February 22, 2023, 1:26pm UTC](https://forum.getkirby.com/t/user-login-and-activity-history/27926/8 "2023-02-22T13:26:55Z")

</div>

BTW: just quickly installed the plugin and works fine.

Note that this plugin stores its data in a sqlite database in `site/logs/kirby3-logger/logs.sqlite`. So sqlite must be available on your system and this folder must be writable.

Having said this, the plugin readme says:

> ⚠ This plugin is under development. Please rethink using it in a commercial project.

---

<div class="post-metadata">

**Author:** ![Wamb](https://avatars.discourse-cdn.com/v4/letter/w/898d66/32.png) [@Wamb](https://forum.getkirby.com/u/Wamb)\
**Post date:** [February 22, 2023, 1:36pm UTC](https://forum.getkirby.com/t/user-login-and-activity-history/27926/9 "2023-02-22T13:36:54Z")

</div>

> [@texnixe](#):
>
> BTW: just quickly installed the plugin and works fine.
> 
> Note that this plugin stores its data in a sqlite database in `site/logs/kirby3-logger/logs.sqlite`. So sqlite must be available on your system and this folder must be writable.
> 
> Having said this, the plugin readme says:

I have read that it is still in development. Do I have to use kirby with sqlite? Because sqlite is available on the server.

```cmd
> php -v
PHP 8.1.14 (cgi-fcgi) (built: Jan 11 2023 16:58:50)
Copyright (c) The PHP Group
Zend Engine v4.1.14, Copyright (c) Zend Technologies
> php -m
[PHP Modules]
bcmath
bz2
calendar
cgi-fcgi
Core
ctype
curl
date
dba
dom
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
imagick
imap
intl
json
libxml
mailparse
mbstring
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
Reflection
session
SimpleXML
soap
sodium
SPL
sqlite3
standard
tidy
tokenizer
xml
xmlreader
xmlwriter
xsl
zip
zlib

[Zend Modules]

```

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [February 22, 2023, 2:17pm UTC](https://forum.getkirby.com/t/user-login-and-activity-history/27926/10 "2023-02-22T14:17:20Z")

</div>

> [@Wamb](#):
>
> Do I have to use kirby with sqlite?

No, you don’t have to do anything. The log database should be created automatically. Is it created?

---

<div class="post-metadata">

**Author:** ![Wamb](https://avatars.discourse-cdn.com/v4/letter/w/898d66/32.png) [@Wamb](https://forum.getkirby.com/u/Wamb)\
**Post date:** [February 22, 2023, 2:42pm UTC](https://forum.getkirby.com/t/user-login-and-activity-history/27926/11 "2023-02-22T14:42:05Z")

</div>

> [@texnixe](#):
>
> No, you don’t have to do anything. The log database should be created automatically. Is it created?

under which path is it created?

---

<div class="post-metadata">

**Author:** ![jimbobrjames](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jimbobrjames/32/5802_2.png) [@jimbobrjames](https://forum.getkirby.com/u/jimbobrjames)\
**Post date:** [February 22, 2023, 2:45pm UTC](https://forum.getkirby.com/t/user-login-and-activity-history/27926/12 "2023-02-22T14:45:37Z")

</div>

> [@texnixe](#):
>
> site/logs/kirby3-logger/logs.sqlite

Should be in the above location

---

<div class="post-metadata">

**Author:** ![Wamb](https://avatars.discourse-cdn.com/v4/letter/w/898d66/32.png) [@Wamb](https://forum.getkirby.com/u/Wamb)\
**Post date:** [February 22, 2023, 2:47pm UTC](https://forum.getkirby.com/t/user-login-and-activity-history/27926/13 "2023-02-22T14:47:01Z")

</div>

i found it and with chmod 775

I have now made a few content changes and these are not displayed in the logger

---

<div class="post-metadata">

**Author:** ![Wamb](https://avatars.discourse-cdn.com/v4/letter/w/898d66/32.png) [@Wamb](https://forum.getkirby.com/u/Wamb)\
**Post date:** [February 22, 2023, 3:08pm UTC](https://forum.getkirby.com/t/user-login-and-activity-history/27926/14 "2023-02-22T15:08:23Z")

</div>

As soon as I try to save the changes, I get an error:

> The JSON response could not be parsed.  
> Note: Unknown: File was created in the system’s temporary directory in Unknown on line 0
> 
> Warning: Cannot modify header information - headers already sent in Unknown on line 0

when i log out of the panel the frontend page does not work anymore

**site/plugins/kirby3-logger/classes/Logger.php**

Call to a member function email() on null

line 159:

```php
'user' => kirby()->user()->email(),

```

I can at least fix this error in Logger.php

```php
/**
     * @param Event $event
     */
    public static function log(Event $event): void
    {
        if (!in_array($event->type(), self::TYPES) || $event->action() === 'render') {
            return;
        }

        $log = self::getLog($event);
        self::$connection->table('logs')->insert($log->toArray());
    }

```

i can install it and i see the link in the menu and the logger overview is always empty
