config.php might not exist, eg in monolith mode

This commit is contained in:
Shish 2012-02-02 03:53:18 +00:00
parent 699087cd98
commit f198128f06

View file

@ -173,7 +173,7 @@ class User {
*/ */
public function get_auth_token() { public function get_auth_token() {
global $config; global $config;
$salt = file_get_contents("config.php"); $salt = DATABASE_DSN;
$addr = get_session_ip($config); $addr = get_session_ip($config);
return md5(md5($this->passhash . $addr) . "salty-csrf-" . $salt); return md5(md5($this->passhash . $addr) . "salty-csrf-" . $salt);
} }