mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-12-23 01:55:01 +00:00
Link own username to your user page
This commit is contained in:
parent
3c7e4fb09a
commit
6b2cdc354a
3 changed files with 5 additions and 2 deletions
|
@ -15,6 +15,7 @@
|
|||
- You can change your password
|
||||
- [Module API] Added `$env->user_data` and `save_userdata()` to interact with the logged in users' data
|
||||
- User pages! Every page under `Users/` by default belongs to their respective users. e.g. `Users/admin` and all the pages under it belong to the `admin` user, so no other user can edit them.
|
||||
- You can access your own user page by clicking on your username in the top corner when you're logged in.
|
||||
- Added the `user_page_prefix` setting to allow customisation of where user pages should be located. Default value: `Users`
|
||||
- [Module API] Added `get_user_pagename()` and `extract_user_from_userpage()` to allo programatic detection etc.
|
||||
|
||||
|
|
|
@ -1403,7 +1403,8 @@ class page_renderer
|
|||
if(module_exists("feature-user-preferences")) {
|
||||
$result .= "<a href='?action=user-preferences'>$settings->user_preferences_button_text</a>";
|
||||
}
|
||||
$result .= self::render_username($env->user) . " <small>(<a href='index.php?action=logout'>Logout</a>)</small>";
|
||||
$result .= "<a href='?page=" . rawurlencode("$settings->user_page_prefix/$env->user") . "'>" . self::render_username($env->user) . "</a>";
|
||||
$result .= " <small>(<a href='index.php?action=logout'>Logout</a>)</small>";
|
||||
$result .= "</span>";
|
||||
//$result .= page_renderer::$nav_divider;
|
||||
}
|
||||
|
|
3
core.php
3
core.php
|
@ -1084,7 +1084,8 @@ class page_renderer
|
|||
if(module_exists("feature-user-preferences")) {
|
||||
$result .= "<a href='?action=user-preferences'>$settings->user_preferences_button_text</a>";
|
||||
}
|
||||
$result .= self::render_username($env->user) . " <small>(<a href='index.php?action=logout'>Logout</a>)</small>";
|
||||
$result .= "<a href='?page=" . rawurlencode("$settings->user_page_prefix/$env->user") . "'>" . self::render_username($env->user) . "</a>";
|
||||
$result .= " <small>(<a href='index.php?action=logout'>Logout</a>)</small>";
|
||||
$result .= "</span>";
|
||||
//$result .= page_renderer::$nav_divider;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue