Page 1 of 1

Error in function username in home.php

Posted: Fri Aug 10, 2018 2:01 pm
by herrheinrich
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.

Re: Error in function username in home.php

Posted: Fri Aug 10, 2018 2:12 pm
by Edi
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".

Re: Error in function username in home.php

Posted: Fri Aug 10, 2018 2:18 pm
by diego
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

SOLVED: Re: Error in function username in home.php

Posted: Sat Aug 11, 2018 6:06 pm
by herrheinrich
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.