Merge pull request #4099 from dhensby/pulls/security-login-url

FIX use config for Security::$login_url
This commit is contained in:
Damian Mooyman 2015-04-28 13:56:24 +12:00
commit fdc2141d3f

View File

@ -1047,7 +1047,8 @@ class Security extends Controller {
* Set a custom log-in URL if you have built your own log-in page.
*/
public static function set_login_url($loginUrl) {
self::$login_url = $loginUrl;
Deprecation::notice('3.1', 'Use the "Security.login_url" config setting instead');
static::config()->update('login_url', $loginUrl);
}
/**
@ -1055,7 +1056,7 @@ class Security extends Controller {
* Defaults to Security/login but can be re-set with {@link set_login_url()}
*/
public static function login_url() {
return self::$login_url;
return static::config()->get('login_url');
}
}