可可的可 发表于 2026-4-27 03:17:30

积分清零后,如何重置用户组? New

我把所有普通用户的基础积分 1 类型,全部清零了。


这个时候出现了一个问题,老用户的用户组已经上级上去了,老用户组还是(论坛元老),


请问这种情况下,如何重置所有普通用户为 新手上路?


管理员,以及别的自定义用户组,比如vip会员等等,不受影响。如何操作?


有没有什么SQL命令,或者后台升级方法?


1 贡献最佳答案

      修改积分公式后如果重建所有用户等级/重建用户组。
https://www.dismall.com/thread-23026-1-1.html
来自: Discuz! 官方交流社区


天外飘仙发表于2026-4-16 14:22:50
[*]详细答案 >

霸王别姬 发表于 2026-4-27 03:17:45

https://addon.dismall.com/plugins/tshuz_resetusergroup.html

可可的可 发表于 2026-4-27 03:18:42



修改积分公式后如果重建所有用户等级/重建用户组。
https://www.dismall.com/thread-23026-1-1.html
来自: Discuz! 官方交流社区

知行社区 发表于 2026-4-27 03:19:25

谢谢飘仙,可以解决。。
       

                        用户组积分变更后,用户组不会自动变更,需要用户登录后,才会变更。
       

                        这个php就是解决这个问题的。
       

                        经过测试,该php不会对自定义用户组产生影响,比如vip用户等等。。
       

                        只对普通用户起作用。。
       

                        将该Php文件放到服务器目录,Discuz X的目录,浏览器直接运行,即可。
       

                        插件作者是飘仙,谢谢他。
       

                                                                                                                                                           
                       
                                                        Discuz X用户组自动更新
                       
                                                                                               
       
   

                        https://wwbmr.lanzouw.com/iaZ0G3neamle
       

.ce-block {    margin-bottom: 20px;}.ce-block__content,.ce-toolbar__content {        /* max-width:calc(100% - 50px) */        margin-left: auto;    margin-right: auto;}.ce-paragraph {    line-height: 1.6em;    outline: none;    text-indent: 2em;    font-size: 16px;}.ce-paragraph--right {    text-align: right;}.ce-paragraph--center {    text-align: center;}.ce-paragraph--left {    text-align: left;}.ce-paragraph--justify {    text-align: justify;}.ce-paragraph-text-indent {    text-align: justify;}.ce-paragraph:empty::before{content: attr(data-placeholder);color: #707684;font-weight: normal;opacity: 0;}/** Show placeholder at the first paragraph if Editor is empty */.codex-editor--empty .ce-block:first-child .ce-paragraph:empty::before {opacity: 1;}.codex-editor--toolbox-opened .ce-block:first-child .ce-paragraph:empty::before,.codex-editor--empty .ce-block:first-child .ce-paragraph:empty:focus::before {opacity: 0;}.ce-paragraph p:first-of-type{    margin-top: 0;}.ce-paragraph p:last-of-type{    margin-bottom: 0;}.svg-icon {    width: 1em;    height: 1em;}.svg-icon path,.svg-icon polygon,.svg-icon rect {    fill: #4691f6;}.svg-icon circle {    stroke: #4691f6;    stroke-width: 1;}.ce-block {    margin-bottom: 20px;}.ce-block__content,.ce-toolbar__content {        /* max-width:calc(100% - 50px) */        margin-left: auto;    margin-right: auto;}.cdx-attaches {--color-line: #EFF0F1;--color-bg: #fff;--color-bg-secondary: #F8F8F8;--color-bg-secondary--hover: #f2f2f2;--color-text-secondary: #707684;}.cdx-attaches--with-file {    display: flex;    align-items: center;    padding: 10px 12px;    border: 1px solid #EFF0F1;    border-radius: 7px;    background: #fff;}.cdx-attaches--with-file .cdx-attaches__file-info {      display: grid;      grid-gap: 4px;      max-width: calc(100% - 80px);      margin: auto 0;      flex-grow: 2;    }.cdx-attaches--with-file .cdx-attaches__download-button {      display: flex;      align-items: center;      background: #F8F8F8;      padding: 6px;      border-radius: 6px;      margin: auto 0 auto auto;    }.cdx-attaches--with-file .cdx-attaches__download-button:hover {      background: #f2f2f2;      }.cdx-attaches--with-file .cdx-attaches__download-button svg {      width: 20px;      height: 20px;      fill: none;      }.cdx-attaches--with-file .cdx-attaches__file-icon {      position: relative;    }.cdx-attaches--with-file .cdx-attaches__file-icon-background {      background-color: #333;      width: 27px;      height: 30px;      margin-right: 12px;      border-radius: 8px;      display: flex;      align-items: center;      justify-content: center;      }@supports(-webkit-mask-box-image: url('')){.cdx-attaches--with-file .cdx-attaches__file-icon-background {          border-radius: 0;          -webkit-mask-box-image: url("data:image/svg+xml,%3Csvg width=%2724%27 height=%2724%27 viewBox=%270 0 24 24%27 fill=%27none%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cpath d=%27M0 10.3872C0 1.83334 1.83334 0 10.3872 0H13.6128C22.1667 0 24 1.83334 24 10.3872V13.6128C24 22.1667 22.1667 24 13.6128 24H10.3872C1.83334 24 0 22.1667 0 13.6128V10.3872Z%27 fill=%27black%27/%3E%3C/svg%3E%0A") 48% 41% 37.9% 53.3%      };      }.cdx-attaches--with-file .cdx-attaches__file-icon-label {      position: absolute;      left: 3px;      top: 11px;      background: inherit;      text-transform: uppercase;      line-height: 1em;      color: #fff;      padding: 1px 2px;      border-radius: 3px;      font-size: 10px;      font-weight: bold;      /* box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.22); */      font-family: ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;      letter-spacing: 0.02em;      }.cdx-attaches--with-file .cdx-attaches__file-icon svg {      width: 20px;      height: 20px;      }.cdx-attaches--with-file .cdx-attaches__file-icon path {      stroke: #fff;      }.cdx-attaches--with-file .cdx-attaches__size {      color: #707684;      font-size: 12px;      line-height: 1em;    }.cdx-attaches--with-file .cdx-attaches__size::after {      content: attr(data-size);      margin-left: 0.2em;      }.cdx-attaches--with-file .cdx-attaches__title {      white-space: nowrap;      text-overflow: ellipsis;      overflow: hidden;      outline: none;      max-width: 90%;      font-size: 14px;      font-weight: 500;      line-height: 1em;    }.cdx-attaches--with-file .cdx-attaches__title:empty::before {      content: attr(data-placeholder);      color: #7b7e89;    }.cdx-attaches--loading .cdx-attaches__title,    .cdx-attaches--loading .cdx-attaches__file-icon,    .cdx-attaches--loading .cdx-attaches__size,    .cdx-attaches--loading .cdx-attaches__download-button,    .cdx-attaches--loading .cdx-attaches__button {      opacity: 0;      font-size: 0;    }.cdx-attaches__button {    display: flex;    align-items: center;    justify-content: center;    color: #000;    border-radius: 7px;    font-weight: 500;}.cdx-attaches__button svg {      margin-top: 0;    }.inline-code {background: rgba(250, 239, 240, 0.78);color: #b44437;padding: 3px 4px;border-radius: 5px;margin: 0 1px;font-family: inherit;font-size: 0.86em;font-weight: 500;letter-spacing: 0.3px;}
页: [1]
查看完整版本: 积分清零后,如何重置用户组? New