News and Announcements > General Discussion
Different plugins per User
(1/1)
malenkin:
Hi,
I've tried ude_login and user_config but seems aren't working for 1.4.X release, is there any other plugin or native way to do it? I need to activate some plugins for only some users
Thanks
JohnDoh:
what error(s) do the plugins give? I've never used either of them but they both look quite simple.
malenkin:
Hi,
No error, just does not work at all.
ude_login.php
// load (remaining) user-specific plugins
foreach (array_unique($user_plugins) as $plugin) {
error_log("Loading plugin => $plugin", 0); // <-- mine, it arrives here
$rcmail->plugins->load_plugin($plugin);
}
users.txt
malenkin enable_plugins=password
errors.log
[24-May-2020 14:41:30 Europe/Rome] Loading plugin => password
But password, or any other plugin does not load. Password works if I declare it in config['plugins']
Thanks for your help.
JohnDoh:
strange i tried it myself and there is nothing in the rc error log either. the plugin does appear to be dead (5 years since last commit) and I don't want to spend time debugging other people's plugins so I guess you'll need to find a different solution. may be make a plugin if your own.
Tip: I don't think `$rcmail->plugins->load_plugin($plugin);` is the right way to load a plugin from inside another plugin, use `$this->require_plugin($plugin);` instead.
malenkin:
my godness, it do the trick!.
Many thanks for your help and work for community.
Navigation
[0] Message Index
Go to full version