Alexandre Alapetite
2016-10-24 01:41:09 +02:00
parent 1f03e8a3ae
commit ab4ece6780
6 changed files with 260 additions and 140 deletions

View File

@@ -24,7 +24,7 @@ class FreshRSS_user_Controller extends Minz_ActionController {
}
}
private static function hashPassword($passwordPlain) {
public static function hashPassword($passwordPlain) {
if (!function_exists('password_hash')) {
include_once(LIB_PATH . '/password_compat.php');
}
@@ -112,9 +112,6 @@ class FreshRSS_user_Controller extends Minz_ActionController {
$userConfig['language'] = 'en';
}
$default_user = FreshRSS_Context::$system_conf->default_user;
$ok &= (strcasecmp($new_user_name, $default_user) !== 0); //It is forbidden to alter the default user
$ok &= !in_array(strtoupper($new_user_name), array_map('strtoupper', listUsers())); //Not an existing user, case-insensitive
$configPath = join_path(DATA_PATH, 'users', $new_user_name, 'config.php');