0

I've tried to set some things in my general.php config file but they're being ignored.

I have the following but all are being ignored. For example, when the user receives the activation email, upon clicking the link the account is activated but they're not taken to my template 'user/activation-success' but instead the homepage and also not automatically logged in, like I'm setting. Any ideas?

return array(
    'setPasswordPath' => 'user/set-password',
    'activateAccountSuccessPath' => 'user/activation-success',
    'autoLoginAfterAccountActivation' => true
);

I'm running 2.5.2757.

Updated to show my full config file:

<?php

return array(
    'setPasswordPath' => 'user/set-password',
    'activateAccountSuccessPath' => 'user/activation-success',
    'autoLoginAfterAccountActivation' => true,

    '*' => array(
        'omitScriptNameInUrls' => true,
    ),

    '.local' => array(
        'devMode' => true,
        'userSessionDuration' => false
    ),

    '.co.uk' => array(
        'cooldownDuration' => 0,
    ),

    '.com' => array(
        'cooldownDuration' => 0,
    )
);
4
  • Are you sure you're not already logged in with another account when you're testing this?
    – Brad Bell
    Jan 14, 2016 at 18:14
  • No, I'm using a different browser and ensuring that there is no logged in user on it. I've tried this many times now with no joy. Jan 15, 2016 at 8:10
  • Is this your full general.php file, or is it just a pared-down version? Jan 15, 2016 at 18:14
  • No but I've updated the above to show it. The domain based items (i.e. 'devMode' => true) are working fine. Jan 15, 2016 at 18:35

1 Answer 1

4

You're close! Those config settings are off in no-mans-land right now. If you want them to apply across all of your multi-environment configs, you need to move them into the '*' array like so:

return array(

    '*' => array(
        'omitScriptNameInUrls' => true,
        'setPasswordPath' => 'user/set-password',
        'activateAccountSuccessPath' => 'user/activation-success',
        'autoLoginAfterAccountActivation' => true,
    ),

    '.local' => array(
        'devMode' => true,
        'userSessionDuration' => false
    ),

    '.co.uk' => array(
        'cooldownDuration' => 0,
    ),

    '.com' => array(
        'cooldownDuration' => 0,
    )
);
1
  • Ah, don't know how I didn't figure that out. Thanks, all working now! Jan 18, 2016 at 9:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.