It looks like you're new here. If you want to get involved, click one of these buttons!
class Massmail extends Fuel_base_controller {
public $nav_selected = 'tools/massmail';
public $view_location = 'massmail';
function __construct()
{
parent::__construct(FALSE);
$this->load->module_config(MASSMAIL_FOLDER, 'massmail');
if ($this->config->item('massmail_authenticate'))
{
$this->_check_login();
}
}
function _remap(){
$element = $this->uri->segment(4);
switch($element){
default:
$this->_lista();
}
}
function _lista(){
$vars=array();
$this->_render('massmail_view', $vars);
}
}
Comments
By the looks of that, you have no $user variable defined.
Assuming _lista() is running, what happens when you add $vars['user'] = 'suw'; to it?
1. I took a look at fuel's fuel_header.php it seems I need to declare How can I get the current logged username? isn't that automatically done by the fuel render? Did I missed something?
2. what's the difference between Both commands load the config file? which one should we use?
I added a private global variable in class and filled it with current username value. Please let me know if there's other way to do this!
config/massmail.php I also removed the If command - to force check login I have same error - unless I read manually the user status with this: I am pretty shure somewhere I did something wrong - maybe not included something..
here's my whole code.
controller/massmail.php and config file: config/massmail.php
View file is simple that's it - anyone put those toghether and comment "force read username" - get that error...
parent::__construct(FALSE); => must be TRUE
sorry for this - maybe someone will learn from it - I DID!