newbie - admin changes

Post Reply
arfa
Ssr. Bludit
Posts: 10
Joined: Tue Jul 04, 2017 4:31 am

HI - I have just started exploring Bludit. Great work. Thank you.

Been coding a good while and *always* feel the need to tweak things up. My first Q.

...how to change the user name - from admin? - to 'other'
User avatar
Edi
Site Admin
Posts: 3121
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 54 times
Been thanked: 77 times
Contact:

You can change the standard user "admin" in the file /bl-content/databases/users.php. Use instead of "admin" another name:

Code: Select all

<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
{
    "admin": {
        "firstName": "Edi",
        ...
    }
}
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
User avatar
diego
Site Admin
Posts: 773
Joined: Sat May 16, 2015 2:53 pm
Been thanked: 1 time
Contact:

Hi,
for my side, I prefer create a new user with the role "admin", and disable the user "admin". All this from the Admin panel.
There are some part of Bludit Core that uses the admin even if this disabled.
Regards
Diego
arfa
Ssr. Bludit
Posts: 10
Joined: Tue Jul 04, 2017 4:31 am

Thanks for the replies.
@edi
I most often work at this level so thanks for pointing me to the relevant file.

@diego
Yes, I did see several - if $xxx =='admin' or !='admin' lines in various files so perhaps this is the safer route.

The next thought is - why not make 'admin' editable in the Managers>Users panel?

It all seems very accessible. Thanks again.
User avatar
Edi
Site Admin
Posts: 3121
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 54 times
Been thanked: 77 times
Contact:

I think diegos solution is the better one. And he is the developer. ;-)

At the moment I'm not sure, if my suggestion works in all cases. But till now I had no problems with it.
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
arfa
Ssr. Bludit
Posts: 10
Joined: Tue Jul 04, 2017 4:31 am

So, I have uploaded and will see how it works 'in the world.'

I really appreciate the simplicity. thx
Post Reply