Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
* 可以设置多个管理员了(以`,`分割)
* 修正了错误的许可证
  • Loading branch information
klxf committed Feb 3, 2024
1 parent bbb6e44 commit e294bf6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions auth.php
Expand Up @@ -5,7 +5,7 @@
/**
* DokuWiki Plugin autham (Auth Component)
*
* @license GPL 2 http://www.gnu.org/licenses/gpl-2.0.html
* @license GPL v3 http://www.gnu.org/licenses/gpl-3.0.html
* @author Mr_Fang <klxf@vip.qq.com>
*/
class auth_plugin_autham extends AuthPlugin
Expand Down Expand Up @@ -127,8 +127,10 @@ public function getUserData($user, $requireGroups = true)
$realName = $row["realname"];
$email = $row["email"];
$conn->close();

if($realName == $admin) {

$admin = explode(",", $admin);

if(in_array($realName, $admin)) {
$group = ['admin'];
} else {
$group = ['user'];
Expand Down
2 changes: 1 addition & 1 deletion plugin.info.txt
@@ -1,7 +1,7 @@
base autham
author Mr_Fang
email klxf@vip.qq.com
date 2024-02-01
date 2024-02-03
name AuthAM Plugin
desc Login to DokuWiki with Minecraft AuthMe account
url https://www.dokuwiki.org/plugin:autham

0 comments on commit e294bf6

Please sign in to comment.