*

mocody

  • ****
  • 139 posts
  • Only Marketing matters
Functions.php Added custom method.
« on: July 27, 2021, 08:55:58 AM »
Hallo @mb themes

I added this method to the functions.php but the website went blank, the website is not oppening.
any idea of that./?

Thank you

function cust_restrict_mail_providers() {

    $authorized_providers = array(
        'gmail.com',
        'yahoo.com',
        'hotmail.com'
    );
    $current_provider = preg_replace('/^.*@(.*)$/i', '$1', Params::getParam('s_email'));

    if (!in_array($current_provider, $authorized_providers)) {
        osc_add_flash_error_message( _m('Your current email is not allowed'));
        osc_redirect_to(osc_register_account_url());
exit;
    }

*

MB Themes

Re: Functions.php Added custom method.
« Reply #1 on: July 27, 2021, 03:51:46 PM »
Looks like you are missing ending curly bracket } at the end.
Enable error logging on your hosting and you will see reason.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots