HelpDeskZ Community
Require Authentication - Printable Version

+- HelpDeskZ Community (http://community.helpdeskz.com)
+-- Forum: HelpDeskZ 2 (http://community.helpdeskz.com/forum-3.html)
+--- Forum: Support (http://community.helpdeskz.com/forum-5.html)
+--- Thread: Require Authentication (/thread-55.html)



Require Authentication - UncleStevey - 03-18-2021

Is it possible to configure HelpDeskZ to require a logged in user before submitting a ticket? I don't want anonymous people to be able to create a ticket and a new account. I would like to create the accounts for customers, not allow anyone to create their own account.


RE: Require Authentication - Andres - 03-20-2021

(03-18-2021, 07:34 PM)UncleStevey Wrote: Is it possible to configure HelpDeskZ to require a logged in user before submitting a ticket? I don't want anonymous people to be able to create a ticket and a new account. I would like to create the accounts for customers, not allow anyone to create their own account.

Edit the file /hdz/app/Controllers/Ticket.php

After
PHP Code:
� � public function selectDepartment()
� � 


Add:
PHP Code:
� � � � if(!$this->client->isOnline()){
� � � � � � return redirect()->to(route_to('login'));
� � � � 

Also after
PHP Code:
� � public function create($department_id)
� � 


Add:
PHP Code:
if(!$this->client->isOnline()){
� � � � � � return redirect()->to(route_to('login'));
� � � � 



RE: Require Authentication - Luukullus - 08-07-2022

(03-20-2021, 07:44 PM)Andres Wrote:
(03-18-2021, 07:34 PM)UncleStevey Wrote: Is it possible to configure HelpDeskZ to require a logged in user before submitting a ticket? I don't want anonymous people to be able to create a ticket and a new account. I would like to create the accounts for customers, not allow anyone to create their own account.

Edit the file /hdz/app/Controllers/Ticket.php

After
PHP Code:
� � public function selectDepartment()
� � 


Add:
PHP Code:
� � � � if(!$this->client->isOnline()){
� � � � � � return redirect()->to(route_to('login'));
� � � � 

Also after
PHP Code:
� � public function create($department_id)
� � 


Add:
PHP Code:
if(!$this->client->isOnline()){
� � � � � � return redirect()->to(route_to('login'));
� � � � 

Thanks alot!
Working great Smile