Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons

Reply
 
Thread Tools
Username Change Alert Details »»
Username Change Alert
Version: 1.2, by MarkFL MarkFL is offline
Developer Last Online: Jun 2020 Show Printable Version Email this Page

Category: Administrative and Maintenance Tools - Version: 4.x.x Rating:
Released: 06-16-2016 Last Update: 06-18-2016 Installs: 14
Uses Plugins Auto-Templates
Translations  
No support by the author.

Overview:

This product allows you to designate a forum in which a thread is created and posted to in order to serve as a log of changed usernames. You set the title of the thread and the format of the posts within the thread.

You may also select usergroups whose members can change their own usernames in the UserCP, on the "Edit Profile" page:



Updates:

Version 1.1:
  • Added setting to allow members of selected usergroups to change their own usernames.

Version 1.2:
  • Added new username verification.

Compatibility:

Tested and working on vB 4.2.x and may work on all 4.x.x versions of vBulletin.

Backup/Warning:

This product does not alter your database, however it is always good practice to make regular backups and you should make a backup before installing ANY new mod.

As always, products are USE AT YOUR OWN RISK. I will provide support and do my best to help but no absolute guarantee is offered.

To Install:
  1. Download and extract the attached .zip file.
  2. Follow AdminCP -> Plugins & Products -> Manage Products -> Add/Import Product.
  3. Click on "Choose File" and browse to the product .xml file that was packaged in the .zip file.
  4. Click "Import."
  5. You MUST enable the product in the settings before it will function.
  6. Configure the remaining settings to your liking. Each setting has a detailed explanation of its use.



Support for this product can be found here:

Download Now

File Type: zip MarkFL - Username Change Alert v1.2.zip (5.2 KB, 81 views)

Screenshots

File Type: jpg markfl_uca_acp.jpg (92.7 KB, 0 views)
File Type: png markfl_uca_profile.png (8.5 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:

Comments
  #12  
Old 06-19-2016, 05:26 PM
blind-eddie's Avatar
blind-eddie blind-eddie is offline
 
Join Date: Apr 2006
Location: Michigan
Posts: 2,310
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MarkFL View Post
Update - Version 1.1:
  • Added setting to allow members of selected usergroups to change their own usernames.
4.2.2 allows members to change their own name or this addon allows members to change their own username via usercp?
Reply With Quote
  #13  
Old 06-19-2016, 05:30 PM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by blind-eddie View Post
4.2.2 allows members to change their own name or this addon allows members to change their own username via usercp?
This product auto-edits the "modifyprofile" template to add a username field at the top of the form. vB 4.2.x doesn't allow users to change their usernames out of the box.

This will take some work to port to vB 3.8.x since the format of the template is different, but I will get this working soon. For the time being, I have removed the statement about it working on vB 3.8.x.
Reply With Quote
  #14  
Old 06-20-2016, 12:55 AM
blind-eddie's Avatar
blind-eddie blind-eddie is offline
 
Join Date: Apr 2006
Location: Michigan
Posts: 2,310
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank's Mark
Reply With Quote
  #15  
Old 07-12-2016, 03:31 AM
BrettC Frontier BrettC Frontier is offline
 
Join Date: Jun 2015
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Mark, I looked through the code but did not see this... is there any chance of the addon having a cooldown and no-reuse period?

Cooldown: User cannot change their username no less than X days (abuse prevention).
No-reuse: Utilize the vBulletin4 option called "usernamereusedelay" in the User Registration Options section.
Reply With Quote
Благодарность от:
MarkFL
  #16  
Old 12-14-2017, 08:39 AM
BrettC Frontier BrettC Frontier is offline
 
Join Date: Jun 2015
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Minor bug found...

- Username input is not being fully sanitized. Input does not encode/escape special characters or non-alphanumeric characters such as ' " ` and so forth. The ' and " on input especially makes vBulletin unhappy, and throws SQL errors to the user and to the email configured for forum admins.

Code:
Invalid SQL:

UPDATE vb_user
SET username = 'New'userName'
WHERE username = 'CurrentUserName';

MySQL Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'userName'
WHERE username = 'CurrentUserName'' at line 2
Error Number : 1064
Reply With Quote
Благодарность от:
MarkFL
  #17  
Old 12-14-2017, 11:55 AM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks...I just fixed that and it will be part of a major update I am working on for this product.
Reply With Quote
  #18  
Old 12-22-2017, 02:41 PM
tuRiver's Avatar
tuRiver tuRiver is offline
 
Join Date: Mar 2009
Location: BA
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

is it possible to make it just post the alert? Because im handling username changes using a dbtech plugin. Thanks
Reply With Quote
  #19  
Old 12-22-2017, 04:06 PM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by tuRiver View Post
is it possible to make it just post the alert? Because im handling username changes using a dbtech plugin. Thanks
Not without knowing how the other product works.
Reply With Quote
  #20  
Old 01-24-2018, 08:49 AM
jagtpf jagtpf is offline
 
Join Date: Mar 2015
Location: Scotland
Posts: 176
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have a suspicion that this product is preventing me adding a new user manually?

I have an error that appears unrelated to the 'normal' software ....

Quote:
Database error in vBulletin 4.2.3 Release Candidate 1:

Invalid SQL:

SELECT thread.*
FROM thread AS thread
WHERE title = 'Username Changes'
AND forumid =;

MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 4
Error Number : 1064
Request Date : Wednesday, January 24th 2018 @ 09:17:52 AM
Error Date : Wednesday, January 24th 2018 @ 09:17:52 AM
Script : http://cccccccccc/admi....php?do=update
Referrer : https://ccccccccccccc/adm...ser.php?do=add
IP Address : xxxxxxxxxxxx
Username : xxxxxxxx
Classname : vB_Database_MySQLi
MySQL Version : 5.6.38
Reply With Quote
  #21  
Old 01-24-2018, 01:04 PM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, as a hot fix for this issue, replace the code in the plugin titled "Generate Alert On Username Change (by admin)" with the following:

PHP Code:
if ($vbulletin->options['markfl_uca_active'] AND $vbulletin->GPC['userid'])
{
    
$original fetch_userinfo($vbulletin->GPC['userid']);

    if (
$vbulletin->GPC['user']['username'] != $original['username'])
    {
        require_once(
DIR '/includes/functions_databuild.php');
        if (
$vbulletin->options['markfl_uca_destination'])
        {
            
$mforumid $vbulletin->options['markfl_uca_destination'];
        }
        else
        {
            
$mforumid $vbulletin->options['rpforumid'];
        }

        if (!
$vbulletin->options['markfl_uca_title'])
        {
            
$title 'Username Changes';
        }
        else
        {
            
$title $vbulletin->options['markfl_uca_title'];
        }

        if (!
$vbulletin->options['markfl_uca_reportformat'])
        {
            
$report 'I have changed the following username:' PHP_EOL PHP_EOL 'Old: [OLD]' PHP_EOL PHP_EOL 'New: [NEW]';
        }
        else
        {
            
$report $vbulletin->options['markfl_uca_reportformat'];
        }


        
$find = array('[OLD]''[NEW]');
        
$replace = array($original['username'], $vbulletin->GPC['user']['username']);
        
$report str_replace($find$replace$report);

        
$threads $vbulletin->db->query_read("
            SELECT thread.*
            FROM " 
TABLE_PREFIX "thread AS thread
            WHERE title = '" 
$title "'
            AND forumid = " 
$vbulletin->options['markfl_uca_destination']
        );

        
$report_thread $db->fetch_array($threads);

        
$muserid $vbulletin->userinfo['userid'];
        
$mpostip "";
        
$mallowsmilie '1';
        
$mvisible 1;
        
$showsig 1;

        if (
$report_thread['threadid'])
        {
            
$mpost =& datamanager_init('Post'$vbulletinERRTYPE_ARRAY'threadpost');
            
$reportthreadinfo fetch_threadinfo($report_thread['threadid']);
            
$mpost->set_info('thread',   $reportthreadinfo);
            
$mpost->set_info('is_automated'true);
            
$mpost->setr('threadid',     $report_thread['threadid']);
            
$mpost->setr('userid',       $muserid );
            
$mpost->setr('pagetext',     $report);
            
$mpost->set('allowsmilie',   $mallowsmilie);
            
$mpost->set('visible',       $mvisible);
            
$mpost->set('ipaddress',     $mpostip);
            
$mpost->set('showsignature'$showsig);
            
$mpost->pre_save();
            if (
count($mpost->errors) < AND count($mthread->errors) < 1)
            {
                
$mpost->save();
                unset(
$mthread);
                unset(
$mpost);
            }
            else 
            {
                print 
"Error making new post! " $mthread->errors[0] . $mthread->errors[1] . $mthread->errors[2] ;
            }
            
build_forum_counters($mforumid);
            
mark_thread_read($reportthreadinfofetch_foruminfo($mforumid), $vbulletin->userinfo['userid'], TIMENOW);
        }
        else
        {
            
$mthread =& datamanager_init('Thread_FirstPost'$vbulletinERRTYPE_ARRAY'threadpost');
            
$reportforuminfo fetch_foruminfo($mforumid);
            
$reportthreadinfo = array();
            
$mthread->set_info('forum',    $reportforuminfo);
            
$mthread->set_info('thread',   $reportthreadinfo);
            
$mthread->set_info('is_automated'true);
            
$mthread->set_info('skip_floodcheck'true);
            
$mthread->set_info('mark_thread_read'true);
            
$mthread->setr('forumid',      $mforumid);
            
$mthread->setr('userid',       $muserid );
            
$mthread->setr('pagetext',     $report);
            
$mthread->setr('title',        $title);
            
$mthread->set('allowsmilie',   $mallowsmilie);
            
$mthread->set('visible',       $mvisible);
            
$mthread->set('ipaddress',     $mpostip);
            
$mthread->set('showsignature'$showsig);
            
            
$mthread->pre_save();
            if (
count($mthread->errors) < 1)
            {
                
$threadid $mthread->save();
                
build_thread_counters($mthread);
                unset(
$mthread);
            }
            else 
            {
                print 
"Error making new thread! " $mthread->errors[0] . $mthread->errors[1] . $mthread->errors[2] ;
            }
            
build_forum_counters($mforumid);
        }
    }

Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:26 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07149 seconds
  • Memory Usage 2,413KB
  • Queries Executed 28 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (1)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (2)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (3)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete