jpsantiago
Member
How does this affect trophies if the trophy was granted to the user based on their username?
How does this affect trophies if the trophy was granted to the user based on their username?
Report of the error: Here
- [Bug Fix] Clear username not working
Hello,
I have one problem with your extension, the permission "daysBetweenEachChange" doesn't works correctly because i have configurated this permission for user group "member" at 35 days and for user group "premium" at 5 days but the premium members can not change their username every 5 days.
Do you have a solution for fix this problem ?
Thanks for future reply
Kévin
But it works correctly with XenForo permissions (Signature and others) and i don't understand why this not works with your extension ?Hello,
The problem is that the user is part of two groups.
Regards
When adding a new trophy you can specify usernames in the "Award this trophy if..." panel.
View attachment 169658
However, if the user changes their name it would be different from the text typed in this field. Wouldn't that cause them to lose the trophy?
Hello,Hello,
The problem is that the user is part of two groups.
Regards
$visitor = \XF::visitor();
$userGroups = $visitor['secondary_group_ids'];
$userGroups[] = $visitor['user_group_id'];
$userGroupsComma = implode(',', $userGroups);
$combinationsId = $this->app->db->fetchAll("
SELECT DISTINCT(permission_combination_id)
FROM xf_permission_combination_user_group
WHERE user_group_id IN (" . $userGroupsComma . ")
");
$cache = [];
foreach($combinationsId AS $combinationId)
{
$cacheValue = $this->app->db->fetchOne('
SELECT cache_value
FROM xf_permission_combination
WHERE permission_combination_id = ?
', $combinationId['permission_combination_id']);
$cache[$combinationId['permission_combination_id']] = @unserialize($cacheValue);
}
$lower = PHP_INT_MAX;
foreach($cache AS $_cache)
{
if ($_cache['xc_change_username']['daysBetweenEachChange'] < $lower)
{
$lower = $_cache['xc_change_username']['daysBetweenEachChange'];
}
}
return $lower;
Hello XenConcept,
The previous trick I talked about above is not quite simple as I thought.
I can suggest you this code, not very beautiful, but it works It's up to you to adapt it better if you wish !
PHP:$visitor = \XF::visitor(); $userGroups = $visitor['secondary_group_ids']; $userGroups[] = $visitor['user_group_id']; $userGroupsComma = implode(',', $userGroups); $combinationsId = $this->app->db->fetchAll(" SELECT DISTINCT(permission_combination_id) FROM xf_permission_combination_user_group WHERE user_group_id IN (" . $userGroupsComma . ") "); $cache = []; foreach($combinationsId AS $combinationId) { $cacheValue = $this->app->db->fetchOne(' SELECT cache_value FROM xf_permission_combination WHERE permission_combination_id = ? ', $combinationId['permission_combination_id']); $cache[$combinationId['permission_combination_id']] = @unserialize($cacheValue); } $lower = PHP_INT_MAX; foreach($cache AS $_cache) { if ($_cache['xc_change_username']['daysBetweenEachChange'] < $lower) { $lower = $_cache['xc_change_username']['daysBetweenEachChange']; } } return $lower;
This returns the lower value for the according permission for the visitor
Fixed a problem with the following permissions
- Days between each change
- The number of posts to be able to change username
Error when the user does not have the required posts amount required :
- [Bug Fix] Fixed the conflict with the following add-on : https://xenforo.com/community/resources/sc-member-view-font-awesome.5950/
- When the user does not have permission, If username is pending approval or if he has to wait before we can change username again we hide the save button.
- We have set up the privacy system for history username change
View attachment 173470
Error when...
Stopped working after the last update. Shows log as username changed but does not.
[Bug Fix] The change of the user name does not apply.
[Bug Fix] During the uninstallation the table is not delete.
Fix some bug
Hi, I'm mainly looking for a username log (a log for each user that displays their username history). Does this add-on do that?
We use essential cookies to make this site work, and optional cookies to enhance your experience.