1074

The trongate_administrators module as the home page?

Comments for “The trongate_administrators module as the home page?”
 

Posted by hugo on Sunday 28th April 2024 at 18:01 GMT

Hi and Ahoy, I am new here - glad to be here :-)

I am trying to show the admin login as the home page or the 'http://localhost/app_name/' URL.

My defaults config looks like this:
define('DEFAULT_MODULE', 'trongate_administrators');
define('DEFAULT_CONTROLLER', 'Trongate_administrators');
define('DEFAULT_METHOD', 'login');

I'm getting a strange result and I am able to click directly into trongate_administrators/manage without the need to login.

What am I doing wrong?
And why can I access the trongate_administrators/manage module without a username and password? (I am using Firefox with a Private window so all cookies and so should be cleared out).

Best regards,
Hugo
Level One Member

hugo

User Level: Level One Member

Date Joined: 28/04/2024

Posted by djnordeen on Sunday 28th April 2024 at 20:14 GMT

Hello,
The reason for this is you are in dev mode.
When in Dev mode you are logged in as admin.
In the main cofig folder, config.php change this line to live.
define('ENV', 'dev');
Dan
Early Adopter

djnordeen

User Level: Early Adopter

Date Joined: 20/08/2021

Posted by hugo on Monday 29th April 2024 at 05:25 GMT

Thank you, Dan

That solves the access issue.
I still have an issue with the view file outputs, on the screen:
\xampp\htdocs\app_name\modules\trongate_administrators\views\tg_admin_template.php on line 27


It looks like it is an issue with this line:
<a href="<?= BASE_URL ?>trongate_administrators/create/<?= $data['my_admin_id'] ?>">

I guess 'my_admin_id' is not defined, but it works fine if I go directly to the URL: /trongate_administrators/login

So what is the difference between accessing the URL directly and the configuration:
define('DEFAULT_MODULE', 'trongate_administrators');
define('DEFAULT_CONTROLLER', 'Trongate_administrators');
define('DEFAULT_METHOD', 'login');

?
Level One Member

hugo

User Level: Level One Member

Date Joined: 28/04/2024

×