Hi,
I’m currently trying to pass a function using variables from two different model.
The model SystemEmails is using two variables I need
CONST USERNAME = ':email_username';
CONST PASSWORD = ':email_password';
I need to pass these details to cpanel alongside the other details I’m sending.
The relationship is set up like so in systememail.
public function relations() {
// NOTE: you may need to adjust the relation name and the related
// class name for the relations automatically generated below.
return array(
'sysSystem' => array(self::BELONGS_TO, 'System', 'sys_system_id'),
);
}
And inside the system model I’m trying to get the system email like so
public function relations() {
// NOTE: you may need to adjust the relation name and the related
// class name for the relations automatically generated below.
return array(
'email' => array(self::BELONGS_TO, 'SystemEmail', 'id')
}
and in my function
$email_user = $emailModel->email_username;
$email_password = $emailModel->email_password;
I have also tried
//$email_user = SystemEmail::USERNAME;
//$email_password = SystemEmail::PASSWORD;