Skip to content

Commit

Permalink
Update Mofh.php
Browse files Browse the repository at this point in the history
Fixed new account email not working error
  • Loading branch information
mahtab2003 authored Jun 17, 2024
1 parent b275ff4 commit 095bc01
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions app/models/Mofh.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,22 @@ function create_account($label, $domain)
$res = $this->db->insert('is_account', $data);
if($res !== false)
{
if($this->mailer->is_active())
{
$param['account_username'] = $data['account_username'];
$param['account_password'] = $data['account_password'];
$param['account_domain'] = $data['account_domain'];
$param['cpanel_domain'] = $this->get_cpanel();
$param['main_domain'] = $data['account_main'];
$param['nameserver_1'] = str_replace('cpanel', 'ns1', $this->get_cpanel());
$param['nameserver_2'] = str_replace('cpanel', 'ns2', $this->get_cpanel());
$param['sql_server'] = str_replace('cpanel', 'sqlxxx', $this->get_cpanel());
$param['user_name'] = $this->user->get_name();
$param['user_email'] = $this->user->get_email();
$param['account_label'] = data['account_label'];
$this->mailer->send('account_created', $this->user->get_email(), $param, 'user');
return true;
}
return true;
}
return false;
Expand Down

0 comments on commit 095bc01

Please sign in to comment.