[PR #342] [MERGED] allow usage of custom class for implemeting user configuration persistence #786

Closed
opened 2026-02-25 21:36:14 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/cypht-org/cypht/pull/342
Author: @kroky
Created: 4/29/2019
Status: Merged
Merged: 4/30/2019
Merged by: @jasonmunro

Base: masterHead: feature/custom-user-config


📝 Commits (1)

  • ecb4381 allow usage of custom class for implemeting user configuration persistence

📊 Changes

3 files changed (+21 additions, -5 deletions)

View changed files

📝 hm3.sample.ini (+8 -5)
📝 lib/config.php (+11 -0)
📝 tests/phpunit/config.php (+2 -0)

📄 Description

We needed a way to store user configuration inside Tiki database as user preferences as we already control authentication using Tiki. Saving to a separate table using DB method did not accomplish what we needed as we didn't go through the normal authentication login form (to trigger initial configuration load) and we also didn't use save settings page. Basically, I needed a way to override load_user_config_object function but there was no easy way to do it. I added another configuration option for custom implementation of the user configuration persistence class. Also extended the unit test for that function. Hope all this makes sense!


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/cypht-org/cypht/pull/342 **Author:** [@kroky](https://github.com/kroky) **Created:** 4/29/2019 **Status:** ✅ Merged **Merged:** 4/30/2019 **Merged by:** [@jasonmunro](https://github.com/jasonmunro) **Base:** `master` ← **Head:** `feature/custom-user-config` --- ### 📝 Commits (1) - [`ecb4381`](https://github.com/cypht-org/cypht/commit/ecb43810204d9204f59b06f15b6a9f7e9e35336f) allow usage of custom class for implemeting user configuration persistence ### 📊 Changes **3 files changed** (+21 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `hm3.sample.ini` (+8 -5) 📝 `lib/config.php` (+11 -0) 📝 `tests/phpunit/config.php` (+2 -0) </details> ### 📄 Description We needed a way to store user configuration inside Tiki database as user preferences as we already control authentication using Tiki. Saving to a separate table using DB method did not accomplish what we needed as we didn't go through the normal authentication login form (to trigger initial configuration load) and we also didn't use save settings page. Basically, I needed a way to override `load_user_config_object` function but there was no easy way to do it. I added another configuration option for custom implementation of the user configuration persistence class. Also extended the unit test for that function. Hope all this makes sense! --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-25 21:36:14 +03:00
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/cypht#786
No description provided.