Error in function username in home.php

Post Reply
herrheinrich
Jr. Bludit
Posts: 8
Joined: Fri Aug 10, 2018 10:24 am

Fri Aug 10, 2018 2:01 pm

Hi

Running Bludit 2.3.4 in a fresh install, based on Plesk with PHP 7.1.20,
everything is running smooth so far.
After a fresh install of bayerbergs theme blogr I catched following error:

Code: Select all

Fatal error: Uncaught Error: Call to a member function username() on 
booolean in PATH/home.php:121 
This is the same error others already mentioned in this forum.

I found out that I changed the name of the admin user to Anothername directly in
bl-content/databases/users.php, this is causing the error. Switching back to „admin" everything is tunning fine.

In 2.3.4 PRO this error doesnt occur.
User avatar
Edi
Site Admin
Posts: 1301
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Contact:

Fri Aug 10, 2018 2:12 pm

herrheinrich wrote:
Fri Aug 10, 2018 2:01 pm
This is the same error others already mentioned in this forum.
Which thread or threads do you mean?
I found out that I changed the name of the admin user to Anothername directly in
bl-content/databases/users.php, this is causing the error. Switching back to „admin" everything is tunning fine.
The name or the role? There has always to be at least one user with the role "admin".
Planet Bludit, Tipps, Snippets und nützliche Links. - Newsletter, Informationen zu Bludit (auf Deutsch).
User avatar
diego
Site Admin
Posts: 719
Joined: Sat May 16, 2015 2:53 pm
Contact:

Fri Aug 10, 2018 2:18 pm

There are not different between Bludit and Bludit PRO in the core code.

I do not recommend changing the user admin, just disable it and create a new one, https://docs.bludit.com/en/security/disable-admin-user

Regards
herrheinrich
Jr. Bludit
Posts: 8
Joined: Fri Aug 10, 2018 10:24 am

Sat Aug 11, 2018 6:06 pm

Many thanks Edi & Diego for your answers. Both helped me.

Just to mention what I've done:
I replaced the word "admin" by another name (e.g. "jack") in file bl-content/databases/users.php.

As Diego suggested I created a new user and disabled admin. Now everything runs smooth.
Post Reply