aboutsummaryrefslogtreecommitdiff
path: root/app/Controllers/userController.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Controllers/userController.php')
-rw-r--r--app/Controllers/userController.php16
1 files changed, 6 insertions, 10 deletions
diff --git a/app/Controllers/userController.php b/app/Controllers/userController.php
index ed8e6cc44..650f96fb2 100644
--- a/app/Controllers/userController.php
+++ b/app/Controllers/userController.php
@@ -41,11 +41,9 @@ class FreshRSS_user_Controller extends FreshRSS_ActionController {
$userConfig->passwordHash = $passwordHash;
}
- if (is_array($userConfigUpdated)) {
- foreach ($userConfigUpdated as $configName => $configValue) {
- if ($configValue !== null) {
- $userConfig->_param($configName, $configValue);
- }
+ foreach ($userConfigUpdated as $configName => $configValue) {
+ if ($configValue !== null) {
+ $userConfig->_param($configName, $configValue);
}
}
@@ -224,9 +222,7 @@ class FreshRSS_user_Controller extends FreshRSS_ActionController {
}
}
- if (is_array($userConfigOverride)) {
- $userConfig = array_merge($userConfig, $userConfigOverride);
- }
+ $userConfig = array_merge($userConfig, $userConfigOverride);
$ok = self::checkUsername($new_user_name);
$homeDir = join_path(DATA_PATH, 'users', $new_user_name);
@@ -234,11 +230,11 @@ class FreshRSS_user_Controller extends FreshRSS_ActionController {
if ($ok) {
$languages = Minz_Translate::availableLanguages();
- if (empty($userConfig['language']) || !in_array($userConfig['language'], $languages)) {
+ if (empty($userConfig['language']) || !in_array($userConfig['language'], $languages, true)) {
$userConfig['language'] = 'en';
}
- $ok &= !in_array(strtoupper($new_user_name), array_map('strtoupper', listUsers())); //Not an existing user, case-insensitive
+ $ok &= !in_array(strtoupper($new_user_name), array_map('strtoupper', listUsers()), true); //Not an existing user, case-insensitive
$configPath = join_path($homeDir, 'config.php');
$ok &= !file_exists($configPath);