iionly / elggchat

elggchat
GNU General Public License v2.0
2 stars 1 forks source link

Default user settings not applied #3

Closed oseg closed 8 years ago

oseg commented 8 years ago

In $enable_chat, $allow_contact_from & $show_offline_user default init, replace "==" by "=" (file views/default/forms/elggchat_usersettings/save.php)

<?php
$user = $vars['user'];
$enable_chat = elgg_get_plugin_user_setting('enableChat', $user->getGUID(), 'elggchat');
if (empty($enable_chat)) {
    $enable_chat = "yes";
}
$allow_contact_from = elgg_get_plugin_user_setting('allow_contact_from', $user->getGUID(), 'elggchat');
if (empty($allow_contact_from)) {
    $allow_contact_from = "friends";
}
$show_offline_user = elgg_get_plugin_user_setting('show_offline_user', $user->getGUID(), 'elggchat');
if (empty($show_offline_user)) {
    $show_offline_user = "no";
}
iionly commented 8 years ago

Thanks for reporting.

It's fixed in versions 1.10.8 and 2.0.2.

oseg commented 8 years ago

You're welcome and thank you for all these good plugins.