[GH-ISSUE #579] $root_url Array? #416

Closed
opened 2026-03-02 15:58:36 +03:00 by kerem · 2 comments
Owner

Originally created by @ghost on GitHub (Jun 19, 2021).
Original GitHub issue: https://github.com/prasathmani/tinyfilemanager/issues/579

I have a system where every user has their own root url.

For example, user john123 may have the root url https://content.john123.example.com/static/.

Is there a way for me to set this up so $root_url uses an array?

For example:

// Root url for links in file manager.Relative to $http_host. Variants: '', 'path/to/subfolder'
// Will not working if $root_path will be outside of server document root
$root_url = array(
	'john123' => 'https://content.john123.example.com/static/',

);
Originally created by @ghost on GitHub (Jun 19, 2021). Original GitHub issue: https://github.com/prasathmani/tinyfilemanager/issues/579 I have a system where every user has their own root url. For example, user `john123` may have the root url `https://content.john123.example.com/static/`. Is there a way for me to set this up so `$root_url` uses an array? For example: ``` // Root url for links in file manager.Relative to $http_host. Variants: '', 'path/to/subfolder' // Will not working if $root_path will be outside of server document root $root_url = array( 'john123' => 'https://content.john123.example.com/static/', ); ```
kerem closed this issue 2026-03-02 15:58:36 +03:00
Author
Owner

@prasathmani commented on GitHub (Jun 19, 2021):

image

<!-- gh-comment-id:864411441 --> @prasathmani commented on GitHub (Jun 19, 2021): ![image](https://user-images.githubusercontent.com/11345598/122645083-1d99f400-d136-11eb-9ac8-7f53a079705b.png)
Author
Owner

@ghost commented on GitHub (Jun 19, 2021):

Just tried this (same as in img) and it isn't working... unchanged

$root_url = array(
	'john123' => 'https://content.john123.example.com/static/',
);
if (isset($_SESSION[FM_SESSION_ID]['logged']) && !empty($directories_users[$_SESSION[FM_SESSION_ID]['logged']])){
	$root_url = $root_url[$_SESSION[FM_SESSION_ID]['logged']];
}
<!-- gh-comment-id:864414415 --> @ghost commented on GitHub (Jun 19, 2021): Just tried this (same as in img) and it isn't working... unchanged ``` $root_url = array( 'john123' => 'https://content.john123.example.com/static/', ); if (isset($_SESSION[FM_SESSION_ID]['logged']) && !empty($directories_users[$_SESSION[FM_SESSION_ID]['logged']])){ $root_url = $root_url[$_SESSION[FM_SESSION_ID]['logged']]; } ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tinyfilemanager#416
No description provided.