diff --git a/src/plugins/templates/images/wbb2.png b/src/plugins/templates/images/wbb2.png new file mode 100644 index 0000000..864ab3e Binary files /dev/null and b/src/plugins/templates/images/wbb2.png differ diff --git a/src/plugins/templates/wbb2auth.plugin.prefs.tpl b/src/plugins/templates/wbb2auth.plugin.prefs.tpl new file mode 100644 index 0000000..5e286d8 --- /dev/null +++ b/src/plugins/templates/wbb2auth.plugin.prefs.tpl @@ -0,0 +1,50 @@ +
\ No newline at end of file diff --git a/src/plugins/wbb2.auth.php b/src/plugins/wbb2.auth.php index c7a63f1..4b8a9fe 100644 --- a/src/plugins/wbb2.auth.php +++ b/src/plugins/wbb2.auth.php @@ -1,10 +1,21 @@ name = 'wbb2 Authentication Plugin'; - $this->author = 'IND-InterNetDienst Schlei'; + $this->author = 'b1gMail Project, IND-InterNetDienst Schlei'; $this->web = 'http://www.ind.de/'; $this->mail = 'b1gmail.com@ind.de'; - $this->version = sprintf('%d.%d', $vMajor, $vMinor); - $this->designedfor = '7.1.0'; + $this->version = '1.0.1'; $this->type = BMPLUGIN_DEFAULT; $this->update_url = 'http://my.b1gmail.com/update_service/'; // admin pages $this->admin_pages = true; $this->admin_page_title = 'wbb2-Auth'; + $this->admin_page_icon = "wbb2.png"; } + + + /** + * get list of domains + * + * @return array + */ + private function _getDomains() + { + global $bm_prefs; + + if(function_exists('GetDomainList')) + return GetDomainList(); + else + return explode(':', $bm_prefs['domains']); + } /** * installation routine @@ -102,7 +125,7 @@ class wbb2AuthPlugin extends BMPlugin // Domainliste ggf. neu erstellen, wenn Registrierung ueber UserDomain nicht mehr gewuenscht if($wbb2_prefs['enableReg']==0) { - $domains = explode(':', $bm_prefs['domains']); + $domains = $this->_getDomains(); foreach($domains as $domain) { if($domain != $wbb2_prefs['userDomain']) @@ -151,7 +174,7 @@ class wbb2AuthPlugin extends BMPlugin $wbb2DB = new DB($mysql); // search user - $res = $wbb2DB->Query('SELECT `userID`,`password`,`sha1_password`,`email` FROM ' . $wbb2_prefs['mysqlPrefix'] . 'users WHERE `username`=? AND `activation`=1 AND `blocked`=0', + $res = $wbb2DB->Query('SELECT userid,password,email FROM ' . $wbb2_prefs['mysqlPrefix'] . 'users WHERE username=? AND activation=1 AND blocked=0', $userName); if($res->RowCount() == 0) return(false); @@ -303,7 +326,7 @@ class wbb2AuthPlugin extends BMPlugin $res->Free(); // assign - $tpl->assign('domains', explode(':', $bm_prefs['domains'])); + $tpl->assign('domains', $this->_getDomains()); $tpl->assign('wbb2_prefs', $wbb2_prefs); $tpl->assign('pageURL', $this->_adminLink()); $tpl->assign('page', $this->_templatePath('wbb2auth.plugin.prefs.tpl'));