Support Forums - Classified Ads Script Osclass

General osclass questions => General discussion => Topic started by: mocody on July 27, 2021, 08:55:58 AM

Title: Functions.php Added custom method.
Post by: mocody 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;
    }
Title: Re: Functions.php Added custom method.
Post by: MB Themes 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.