Announcement

Collapse
No announcement yet.

Deleting all users avatars

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Deleting all users avatars

    How can I delete all users' avatars ?

  • #2
    This is untested on 3.5.x so backup your database first. Then run this query to remove these avatars from the user table:

    You can edit each users accounts and choose 'no avatar' if you do not want to go this route.
    I do not know if this deletes them or rather resets them not to display.
    Code:
    UPDATE user SET avatarid='0';
    # delete from usergroup
    # replace 'X' with usergroup identification number
    Note: This will or may not work if Secondary group has avatars abilities and primary does not.
    Code:
    UPDATE user SET avatarid=0 WHERE usergroupid=[COLOR="#ff0000"]X[/COLOR]
    For the next query you would have to create another backup incase other query had unforseen error(s)
    Run this query to delete all 'Custom Avatar' from Option 1 and 2
    Code:
    DELETE FROM customavatar;
    ---------------------
    **Ameadment**
    //This nolonger applies to these queries.
    Just found what maybe and adverse effect for 3.6.5. For some reason another radio button appears and the avatar window disappears. No templates were edited on test site.
    Last edited by Jose Amaral Rego; Wed 6 Jun '07, 11:50pm.

    Comment


    • #3
      Here's the error I get now:

      An error occurred while attempting to execute your query. The following information was returned.
      error number: 1146
      error desc: Table 'warrifl_forums.user' doesn't exist

      I really need to get this fixed if someone could please help.

      Thank you.

      Comment


      • #4
        You might have a prefix for your tables

        Comment


        • #5
          I do, it is "vb3_", but how do I add that to the query so it calls the correct table?

          Comment


          • #6
            vb3_user
            vb3_customavatar
            UPDATE vb3_user SET avatarid='0';
            DELETE FROM vb3_customavatar;

            You add it like this

            Comment


            • #7
              An error occurred while attempting to execute your query. The following information was returned.
              error number: 1064
              error desc: 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 'vb3_user
              vb3_customavatar
              UPDATE vb3_user SET avatarid='0';
              DELETE FROM vb3_c' at line 1

              Comment


              • #8
                That would have changed all users to no avatar though anyway.

                I only need usergroupid 2 changed to no avatar.

                Comment


                • #9
                  UPDATE vb3_user SET avatarid=0 WHERE usergroupid=2

                  If they are uploaded (custom) ones, then you might want to read this post and ask over at vBulletin.org if script still works. You might also need the permission from Jake Bunce if you are going to redistribute his query. You can just link to page and somebody may help you.
                  http://www.vbulletin.com/forum/showp...89&postcount=3
                  Last edited by Jose Amaral Rego; Wed 14 Nov '07, 2:52am.

                  Comment

                  Loading...
                  Working...
                  X