Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions app/Controllers/userController.php
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,20 @@ public function manageAction() {
}
}

public static function createUser($new_user_name, $email, $passwordPlain, $apiPasswordPlain, $userConfig = array(), $insertDefaultFeeds = true) {
if (!is_array($userConfig)) {
$userConfig = array();
public static function createUser($new_user_name, $email, $passwordPlain, $apiPasswordPlain, $userConfigOverride = array(), $insertDefaultFeeds = true) {
$userConfig = array();

$customUserConfigPath = join_path(DATA_PATH, 'config-user.custom.php');
if (file_exists($customUserConfigPath)) {
$customUserConfig = include($customUserConfigPath);
}

if (is_array($customUserConfig)) {
$userConfig = $customUserConfig;
}

if (is_array($userConfigOverride)) {
$userConfig = array_merge($userConfig, $userConfigOverride);
}

$ok = self::checkUsername($new_user_name);
Expand Down
3 changes: 3 additions & 0 deletions config-user.default.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<?php

# Do not modify this file, which defines default values, but create a
# `./data/config-user.custom.php` file instead, containing the keys you want to
# override.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Footnote: GitHub views are fine up to 131 columns ;-)

Copy link
Copy Markdown
Member

@marienfressinaud marienfressinaud Sep 17, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's just that I'm using gqq in Vim which automatically wrap my lines :) But I also limit the lines to 80/100 columns so it looks good when I split my screen

return array (
'language' => 'en',
'old_entries' => 3,
Expand Down
1 change: 1 addition & 0 deletions data/.gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.htpasswd
config.php
config.php.bak.php
config-user.custom.php
force-https.txt
last_update.txt
no-cache.txt
Expand Down