FIX use config for Security::$login_url

This commit is contained in:
Daniel Hensby 2015-04-23 17:20:07 +01:00
parent e0b7bc9cda
commit c2fd18e829

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');
}
}