Welcome Guest, Not a member yet? Register   Sign In
Community Auth - Call to undefined method
#1

Hello!
Please help me!
When I add the code to the controller:
Code:
if( $this->require_role('admin') )
{
   
}
Indicates an error:
Code:
Fatal error: Call to undefined method Welcome::require_role() in /home/q/q9273345/q9273345.beget.tech/public_html/app_crm/controllers/Welcome.php on line 35
A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /home/q/q9273345/q9273345.beget.tech/public_html/app_crm/controllers/Welcome.php:35)

Filename: core/Common.php

Line Number: 573

Backtrace:

A PHP Error was encountered

Severity: Error

Message: Call to undefined method Welcome::require_role()

Filename: controllers/Welcome.php

Line Number: 35

Backtrace:

But under the link http://q9273345.beget.tech/examples/index everything works. Errors do not show.
Reply
#2

Your Welcome.php controller needs to extend MY_Controller.
Reply
#3

(05-06-2017, 02:18 PM)skunkbad Wrote: Ваш контроллер Welcome.php должен расширить MY_Controller.

Thank you very much!
Reply




Theme © iAndrew 2016 - Forum software by © MyBB