User Essentials

User Essentials [Paid] 4.4.1

No permission to buy ($35.00)
@Xon think i found an error when i went in to capitalize a user's name:

Code:
Exception: Email to [unknown] failed setup: Trying to send email to user without email (ID: 902) src/XF/Mail/Mail.php:86
Generated by: A Apr 17, 2018 at 12:09 AM
Stack trace
#0 src/addons/SV/UserEssentials/Service/UsernameChange/Notifier.php(246): XF\Mail\Mail->setToUser(Object(SV\UserEssentials\XF\Entity\User))
#1 src/addons/SV/UserEssentials/Service/UsernameChange/Notifier.php(176): SV\UserEssentials\Service\UsernameChange\Notifier->sendNotification(Object(SV\UserEssentials\XF\Entity\User))
#2 src/addons/SV/UserEssentials/Service/UsernameChange/Creator.php(265): SV\UserEssentials\Service\UsernameChange\Notifier->notify()
#3 src/addons/SV/UserEssentials/XF/Admin/Controller/User.php(144): SV\UserEssentials\Service\UsernameChange\Creator->sendNotifications()
#4 src/addons/SV/UserEssentials/XF/Admin/Controller/User.php(100): SV\UserEssentials\XF\Admin\Controller\User->finalizeUsernameChangeCreate(Object(SV\UserEssentials\Service\UsernameChange\Creator))
#5 src/XF/Mvc/FormAction.php(159): SV\UserEssentials\XF\Admin\Controller\User->SV\UserEssentials\XF\Admin\Controller\{closure}(Object(XF\Mvc\FormAction))
#6 src/XF/Admin/Controller/User.php(504): XF\Mvc\FormAction->run()
#7 src/XF/Mvc/Dispatcher.php(249): XF\Admin\Controller\User->actionSave(Object(XF\Mvc\ParameterBag))
#8 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('XF:User', 'Save', 'json', Object(XF\Mvc\ParameterBag), 'users', Object(SV\UserEssentials\XF\Admin\Controller\User), NULL)
#9 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#10 src/XF/App.php(1891): XF\Mvc\Dispatcher->run()
#11 src/XF.php(328): XF\App->run()
#12 admin.php(13): XF::runApp('XF\\Admin\\App')
#13 {main}
Request state
array(4) {
  ["url"] => string(30) "/admin.php?users/russ.902/save"
  ["referrer"] => string(56) "http://www.dressedwell.net/admin.php?users/russ.902/edit"
  ["_GET"] => array(1) {
    ["users/russ_902/save"] => string(0) ""
  }
  ["_POST"] => array(14) {
    ["user"] => array(14) {
      ["username"] => string(4) "Russ"
      ["email"] => string(0) ""
      ["user_group_id"] => string(1) "3"
      ["is_staff"] => string(1) "1"
      ["user_state"] => string(5) "valid"
      ["custom_title"] => string(0) ""
      ["message_count"] => string(1) "0"
      ["like_count"] => string(1) "0"
      ["trophy_points"] => string(1) "0"
      ["style_id"] => string(1) "0"
      ["language_id"] => string(1) "1"
      ["timezone"] => string(16) "America/New_York"
      ["visible"] => string(1) "1"
      ["activity_visible"] => string(1) "1"
    }
    ["sv_ue_notify"] => string(1) "1"
    ["change_password"] => string(8) "********"
    ["dob_month"] => string(1) "0"
    ["dob_day"] => string(0) ""
    ["dob_year"] => string(0) ""
    ["profile"] => array(4) {
      ["location"] => string(0) ""
      ["website"] => string(0) ""
      ["about"] => string(0) ""
      ["signature"] => string(0) ""
    }
    ["custom_fields"] => array(9) {
      ["gender"] => string(0) ""
      ["occupation"] => string(0) ""
      ["aim"] => string(0) ""
      ["icq"] => string(0) ""
      ["yahoo"] => string(0) ""
      ["skype"] => string(0) ""
      ["gtalk"] => string(0) ""
      ["facebook"] => string(0) ""
      ["twitter"] => string(0) ""
    }
    ["option"] => array(7) {
      ["content_show_signature"] => string(1) "1"
      ["email_on_conversation"] => string(1) "1"
      ["sv_email_on_mention"] => string(1) "1"
      ["sv_email_on_quote"] => string(1) "1"
      ["creation_watch_state"] => string(0) ""
      ["interaction_watch_state"] => string(0) ""
      ["receive_admin_email"] => string(1) "1"
    }
    ["privacy"] => array(5) {
      ["allow_view_profile"] => string(7) "members"
      ["allow_post_profile"] => string(7) "members"
      ["allow_receive_news_feed"] => string(7) "members"
      ["allow_send_personal_conversation"] => string(7) "members"
      ["allow_view_identities"] => string(7) "members"
    }
    ["_xfToken"] => string(8) "********"
    ["_xfRequestUri"] => string(30) "/admin.php?users/russ.902/edit"
    ["_xfWithData"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
  }
}
 
Hello Xon,
would it be possible to set unlock thread and lock thread for some nodes as default?
 
Not currently, it default to allowed if the user has permission. Creating per forum defaults wouldn't be that hard, but I don't currently have the time to look into that.
 
For example: at the current time I have 5600 posts here on XF.com If I would request a name change, then there's probably around 1k quotes and tags with my name in it. Its not feasible to manually edit that.

So please add a function that scans the database for quotes and user mentions for the user and replaces the name of the user.
I plan to update my XF2 User Essentials add-on to support this since it tracks this information of who has mentioned/quoted in a post without having to parse the post to find it.

Don't have an ETA due to how busy I am :(
 
This add-on doesn't add a like_item_discussion template or related like (content type: item, action: discussion), this is showing up because you have something adding a 'Like' without actually adding the required template. sv_ue_account_likes_given.php is being shown because it is showing given likes.
 
Got an error which I think relates to this, when an emoji is used in the thread title. The error is thrown and stops any editing of posts in the thread, except the original first post.

I disabled TH bookmarks, still had the error, as it was mentioned in the error below. Disabled user essentials, post edit works fine when an emoji is used in the title... so default XF is all good. So I think it is this add-on related.

Code:
Server error log
XF\Db\Exception: MySQL query error [1366]: Incorrect string value: '\xF0\x9F\x8C\xAD' for column 'content_title' at row 1 src/XF/Db/AbstractStatement.php:212
Generated by: anthony Jul 20, 2018 at 8:54 AM
Stack trace
INSERT  INTO `useress_user_log` (`content_type`, `content_id`, `user_id`, `ip_address`, `content_user_id`, `content_username`, `content_title`, `content_url`, `discussion_content_type`, `discussion_content_id`, `action`, `action_params`, `user_log_id`, `log_date`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
------------

#0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException('MySQL query err...', 1366, '22007')
#1 src/XF/Db/Mysqli/Statement.php(77): XF\Db\Mysqli\Statement->getException('MySQL query err...', 1366, '22007')
#2 src/XF/Db/AbstractAdapter.php(79): XF\Db\Mysqli\Statement->execute()
#3 src/XF/Db/AbstractAdapter.php(160): XF\Db\AbstractAdapter->query('INSERT  INTO `u...', Array)
#4 src/XF/Mvc/Entity/Entity.php(1389): XF\Db\AbstractAdapter->insert('useress_user_lo...', Array, false)
#5 src/XF/Mvc/Entity/Entity.php(1121): XF\Mvc\Entity\Entity->_saveToSource()
#6 src/addons/SV/UserEssentials/UserLog/AbstractHandler.php(160): XF\Mvc\Entity\Entity->save()
#7 src/addons/SV/UserEssentials/UserLog/AbstractHandler.php(120): SV\UserEssentials\UserLog\AbstractHandler->log(Object(SV\UserEssentials\XF\Entity\Post), 'edit', Array, Object(SV\UserEssentials\XF\Entity\User))
#8 src/addons/SV/UserEssentials/UserLog/Logger.php(100): SV\UserEssentials\UserLog\AbstractHandler->logChange(Object(SV\UserEssentials\XF\Entity\Post), 'message', 'test test add', 'test test', Object(SV\UserEssentials\XF\Entity\User))
#9 src/addons/SV/UserEssentials/XF/Logger.php(90): SV\UserEssentials\UserLog\Logger->logChanges('post', Object(SV\UserEssentials\XF\Entity\Post), true)
#10 src/addons/SV/UserEssentials/XF/Entity/Post.php(92): SV\UserEssentials\XF\Logger->logUserChanges('post', Object(SV\UserEssentials\XF\Entity\Post))
#11 src/XF/Mvc/Entity/Entity.php(1145): SV\UserEssentials\XF\Entity\Post->_postSave()
#12 src/XF/Service/Post/Editor.php(165): XF\Mvc\Entity\Entity->save(true, false)
#13 src/XF/Service/ValidateAndSavableTrait.php(40): XF\Service\Post\Editor->_save()
#14 src/XF/Pub/Controller/Post.php(139): XF\Service\Post\Editor->save()
#15 src/addons/xenMade/HideLinks/XF/Pub/Controller/Post.php(14): XF\Pub\Controller\Post->actionEdit(Object(XF\Mvc\ParameterBag))
#16 src/addons/EWR/Porta/Pub/Controller/Post.php(39): xenMade\HideLinks\XF\Pub\Controller\Post->actionEdit(Object(XF\Mvc\ParameterBag))
#17 src/XF/Mvc/Dispatcher.php(249): EWR\Porta\Pub\Controller\Post->actionEdit(Object(XF\Mvc\ParameterBag))
#18 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('XF:Post', 'Edit', 'json', Object(XF\Mvc\ParameterBag), 'forums', Object(ThemeHouse\Bookmarks\XF\Pub\Controller\Post), NULL)
#19 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#20 src/XF/App.php(1931): XF\Mvc\Dispatcher->run()
#21 src/XF.php(328): XF\App->run()
#22 index.php(13): XF::runApp('XF\\Pub\\App')
#23 {main}
Request state
array(4) {
  ["url"] => string(19) "/posts/1433689/edit"
  ["referrer"] => string(71) "https://www.ptsdnews.com/threads/testing-with-emoji-%F0%9F%8C%AD.85994/"
  ["_GET"] => array(1) {
    ["/posts/1433689/edit"] => string(0) ""
  }
  ["_POST"] => array(8) {
    ["message_html"] => string(20) "<p>test test add</p>"
    ["_xfInlineEdit"] => string(1) "1"
    ["attachment_hash"] => string(32) "728099651f3a0f121802b84e60071933"
    ["attachment_hash_combined"] => string(87) "{"type":"post","context":{"post_id":1433689},"hash":"728099651f3a0f121802b84e60071933"}"
    ["_xfToken"] => string(8) "********"
    ["_xfRequestUri"] => string(47) "/threads/testing-with-emoji-%F0%9F%8C%AD.85994/"
    ["_xfWithData"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
  }
}
 
@Anthony Parsons do you have $config['fullUnicode'] = true; set in config.php? Can you run; show create table useress_user_log and dump the output?

This happens when the table isn't set to allow 4-byte utf8.
 
$config['fullUnicode'] = true;
Yes, that is set.
Code:
useress_user_log | CREATE TABLE `useress_user_log` (
  `user_log_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `log_date` int(10) unsigned NOT NULL,
  `user_id` int(10) unsigned NOT NULL,
  `ip_address` varbinary(16) NOT NULL DEFAULT '',
  `content_type` varchar(25) NOT NULL,
  `content_id` int(10) unsigned NOT NULL,
  `content_user_id` int(10) unsigned NOT NULL,
  `content_username` varchar(50) NOT NULL,
  `content_title` varchar(150) NOT NULL,
  `content_url` text NOT NULL,
  `discussion_content_type` varchar(25) NOT NULL,
  `discussion_content_id` int(10) unsigned NOT NULL,
  `action` varchar(25) NOT NULL,
  `action_params` mediumblob NOT NULL,
  PRIMARY KEY (`user_log_id`),
  KEY `log_date` (`log_date`),
  KEY `user_id_content_type_id` (`user_id`,`content_type`,`content_id`),
  KEY `user_id_log_date` (`user_id`,`log_date`)
) ENGINE=InnoDB AUTO_INCREMENT=25748 DEFAULT CHARSET=utf8 |
 
Please run;
SQL:
ALTER TABLE useress_user_log CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;

It looks like the table wasn't migrated to utf8-mb4 correctly.
 
Hello Xon, after the Update i get the following error:
The command php cmd.php xf:convert-utf8mb4 say me there is nothing to do
Code:
Server error log

    XF\Db\Exception: MySQL statement prepare error [1146]: Table 'Anzahsql1.xf_useress_thread_lock' doesn't exist src/XF/Db/AbstractStatement.php:212

    Generated by: Noriko Jul 29, 2018 at 4:56 PM

Stack trace

            SELECT `xf_thread`.*, `xf_user_User_1`.*, `xf_thread_watch_Watch_2`.*, `xf_draft_DraftReplies_3`.*, `xf_thread_reply_ban_ReplyBans_4`.*, `xf_forum_Forum_5`.*, `xf_node_Node_6`.*, `xf_snog_groups_Group_7`.*, `xf_snog_groups_ParentGroup_8`.*, `xf_snog_groups_settings_Settings_9`.*, `xf_snog_groups_subforums_Subforum_10`.*, `xf_useress_thread_lock_ThreadPermissions_11`.*, `xf_permission_cache_content_Permissions_12`.*, `xf_thread_read_Read_13`.*, `xf_forum_read_Read_14`.*
            FROM `xf_thread`
            LEFT JOIN `xf_user` AS `xf_user_User_1` ON (`xf_user_User_1`.`user_id` = `xf_thread`.`user_id`)
LEFT JOIN `xf_thread_watch` AS `xf_thread_watch_Watch_2` ON (`xf_thread_watch_Watch_2`.`thread_id` = `xf_thread`.`thread_id` AND `xf_thread_watch_Watch_2`.`user_id` = '576')
LEFT JOIN `xf_draft` AS `xf_draft_DraftReplies_3` ON (`xf_draft_DraftReplies_3`.`draft_key` = CONCAT('thread-', `xf_thread`.`thread_id`) AND `xf_draft_DraftReplies_3`.`user_id` = '576')
LEFT JOIN `xf_thread_reply_ban` AS `xf_thread_reply_ban_ReplyBans_4` ON (`xf_thread_reply_ban_ReplyBans_4`.`thread_id` = `xf_thread`.`thread_id` AND `xf_thread_reply_ban_ReplyBans_4`.`user_id` = '576')
LEFT JOIN `xf_forum` AS `xf_forum_Forum_5` ON (`xf_forum_Forum_5`.`node_id` = `xf_thread`.`node_id`)
LEFT JOIN `xf_node` AS `xf_node_Node_6` ON (`xf_node_Node_6`.`node_id` = `xf_forum_Forum_5`.`node_id`)
LEFT JOIN `xf_snog_groups` AS `xf_snog_groups_Group_7` ON (`xf_snog_groups_Group_7`.`node_id` = `xf_node_Node_6`.`node_id`)
LEFT JOIN `xf_snog_groups` AS `xf_snog_groups_ParentGroup_8` ON (`xf_snog_groups_ParentGroup_8`.`node_id` > 0 AND `xf_snog_groups_ParentGroup_8`.`node_id` = `xf_node_Node_6`.`parent_node_id`)
LEFT JOIN `xf_snog_groups_settings` AS `xf_snog_groups_settings_Settings_9` ON (`xf_snog_groups_settings_Settings_9`.`id` = 1)
LEFT JOIN `xf_snog_groups_subforums` AS `xf_snog_groups_subforums_Subforum_10` ON (`xf_snog_groups_subforums_Subforum_10`.`node_id` = `xf_node_Node_6`.`node_id`)
LEFT JOIN `xf_useress_thread_lock` AS `xf_useress_thread_lock_ThreadPermissions_11` ON (`xf_useress_thread_lock_ThreadPermissions_11`.`thread_id` = `xf_thread`.`thread_id`)
LEFT JOIN `xf_permission_cache_content` AS `xf_permission_cache_content_Permissions_12` ON (`xf_permission_cache_content_Permissions_12`.`content_type` = 'node' AND `xf_permission_cache_content_Permissions_12`.`content_id` = `xf_node_Node_6`.`node_id` AND `xf_permission_cache_content_Permissions_12`.`permission_combination_id` = '110')
LEFT JOIN `xf_thread_read` AS `xf_thread_read_Read_13` ON (`xf_thread_read_Read_13`.`thread_id` = `xf_thread`.`thread_id` AND `xf_thread_read_Read_13`.`user_id` = '576')
LEFT JOIN `xf_forum_read` AS `xf_forum_read_Read_14` ON (`xf_forum_read_Read_14`.`node_id` = `xf_forum_Forum_5`.`node_id` AND `xf_forum_read_Read_14`.`user_id` = '576')
            WHERE (`xf_thread`.`thread_id` = '2439')
            
        
LIMIT 1
------------

#0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException('MySQL statement...', 1146, '42S02')
#1 src/XF/Db/Mysqli/Statement.php(39): XF\Db\Mysqli\Statement->getException('MySQL statement...', 1146, '42S02')
#2 src/XF/Db/Mysqli/Statement.php(54): XF\Db\Mysqli\Statement->prepare()
#3 src/XF/Db/AbstractAdapter.php(79): XF\Db\Mysqli\Statement->execute()
#4 src/XF/Mvc/Entity/Finder.php(1130): XF\Db\AbstractAdapter->query('\n\t\t\tSELECT `xf_...')
#5 src/XF/Mvc/Entity/Manager.php(149): XF\Mvc\Entity\Finder->fetchOne()
#6 src/XF/Pub/Controller/Thread.php(1254): XF\Mvc\Entity\Manager->find('XF:Thread', '2439', Array)
#7 src/addons/ThemeHouse/QAForums/XF/Pub/Controller/Thread.php(17): XF\Pub\Controller\Thread->assertViewableThread('2439', Array)
#8 src/addons/XFMG/XF/Pub/Controller/Thread.php(11): ThemeHouse\QAForums\XF\Pub\Controller\Thread->actionIndex(Object(XF\Mvc\ParameterBag))
#9 src/addons/SV/UserEssentials/XF/Pub/Controller/Thread.php(27): XFMG\XF\Pub\Controller\Thread->actionIndex(Object(XF\Mvc\ParameterBag))
#10 src/XF/Mvc/Dispatcher.php(249): SV\UserEssentials\XF\Pub\Controller\Thread->actionIndex(Object(XF\Mvc\ParameterBag))
#11 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('XF:Thread', 'Index', 'html', Object(XF\Mvc\ParameterBag), 'forums', Object(SV\MultiPrefix\XF\Pub\Controller\Thread), NULL)
#12 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#13 src/XF/App.php(1931): XF\Mvc\Dispatcher->run()
#14 src/XF.php(328): XF\App->run()
#15 index.php(13): XF::runApp('XF\\Pub\\App')
#16 {main}

Request state

array(4) {
  ["url"] => string(52) "/threads/teamspeak-aenderungen-am-rechtesystem.2439/"
  ["referrer"] => bool(false)
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 
Top Bottom