f8e57d47764ae46ba50c8ffaa3d2f16456763a9e
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/include/mailaccounts.php    1) <?php
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

modules/email/include/mailaccounts.php   2) /*
modules/email/include/mailaccounts.php   3) This file belongs to the Webinterface of schokokeks.org Hosting
modules/email/include/mailaccounts.php   4) 
Hanno Böck Change license from CC0 to...

Hanno Böck authored 2 years ago

modules/email/include/mailaccounts.php   5) Written by schokokeks.org Hosting, namely
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

modules/email/include/mailaccounts.php   6)   Bernd Wurst <bernd@schokokeks.org>
modules/email/include/mailaccounts.php   7)   Hanno Böck <hanno@schokokeks.org>
modules/email/include/mailaccounts.php   8) 
Hanno Böck Change license from CC0 to...

Hanno Böck authored 2 years ago

modules/email/include/mailaccounts.php   9) This code is published under a 0BSD license.
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

modules/email/include/mailaccounts.php  10) 
modules/email/include/mailaccounts.php  11) Nevertheless, in case you use a significant part of this code, we ask (but not require, see the license) that you keep the authors' names in place and return your changes to the public. We would be especially happy if you tell us what you're going to do with this code.
modules/email/include/mailaccounts.php  12) */
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/include/mailaccounts.php   13) 
modules/imap/include/mailaccounts.php   14) require_once('inc/debug.php');
bernd Logging aktiviert

bernd authored 17 years ago

modules/imap/include/mailaccounts.php   15) require_once('inc/base.php');
bernd XSS/CSRF-Bugs behoben

bernd authored 17 years ago

modules/imap/include/mailaccounts.php   16) require_once('inc/security.php');
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/include/mailaccounts.php   17) 
bernd Domain-Klasse benutzen

bernd authored 17 years ago

modules/imap/include/mailaccounts.php   18) require_once('class/domain.php');
modules/imap/include/mailaccounts.php   19) 
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/include/mailaccounts.php   20) function mailaccounts($uid)
modules/imap/include/mailaccounts.php   21) {
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/mailaccounts.php  22)     $uid = (int) $uid;
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/email/include/mailaccounts.php  23)     $result = db_query("SELECT m.id,concat_ws('@',`m`.`local`,if(isnull(`m`.`domain`),:masterdomain,`d`.`domainname`)) AS `account`, `m`.`password` AS `cryptpass`,`m`.`maildir` AS `maildir`,aktiv from (`mail`.`mailaccounts` `m` left join `mail`.`v_domains` `d` on((`d`.`id` = `m`.`domain`))) WHERE m.uid=:uid ORDER BY if(isnull(`m`.`domain`),:masterdomain,`d`.`domainname`), local", [":masterdomain" => config("masterdomain"), ":uid" => $uid]);
Hanno Böck Spaces between string conca...

Hanno Böck authored 1 year ago

modules/email/include/mailaccounts.php  24)     DEBUG("Found " . @$result->rowCount() . " rows!");
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/email/include/mailaccounts.php  25)     $accounts = [];
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/mailaccounts.php  26)     if (@$result->rowCount() > 0) {
modules/email/include/mailaccounts.php  27)         while ($acc = @$result->fetch(PDO::FETCH_OBJ)) {
Hanno Böck codingstyle, spaces between...

Hanno Böck authored 1 year ago

modules/email/include/mailaccounts.php  28)             array_push($accounts, ['id' => $acc->id, 'account' => $acc->account, 'mailbox' => $acc->maildir, 'cryptpass' => $acc->cryptpass, 'enabled' => ($acc->aktiv == 1)]);
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/mailaccounts.php  29)         }
modules/email/include/mailaccounts.php  30)     }
modules/email/include/mailaccounts.php  31)     return $accounts;
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/include/mailaccounts.php   32) }
modules/imap/include/mailaccounts.php   33) 
modules/imap/include/mailaccounts.php   34) function get_mailaccount($id)
modules/imap/include/mailaccounts.php   35) {
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/mailaccounts.php  36)     $id = (int) $id;
modules/email/include/mailaccounts.php  37)     $uid = (int) $_SESSION['userinfo']['uid'];
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/email/include/mailaccounts.php  38)     $result = db_query("SELECT concat_ws('@',`m`.`local`,if(isnull(`m`.`domain`),:masterdomain,`d`.`domainname`)) AS `account`, `m`.`password` AS `cryptpass`,`m`.`maildir` AS `maildir`,aktiv from (`mail`.`mailaccounts` `m` left join `mail`.`v_domains` `d` on((`d`.`id` = `m`.`domain`))) WHERE m.id=:mid AND m.uid=:uid", [":masterdomain" => config("masterdomain"), ":uid" => $uid, ":mid" => $id]);
Hanno Böck Spaces between string conca...

Hanno Böck authored 1 year ago

modules/email/include/mailaccounts.php  39)     DEBUG("Found " . $result->rowCount() . " rows!");
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/mailaccounts.php  40)     if ($result->rowCount() != 1) {
modules/email/include/mailaccounts.php  41)         system_failure('Dieser Mailaccount existiert nicht oder gehört Ihnen nicht');
modules/email/include/mailaccounts.php  42)     }
modules/email/include/mailaccounts.php  43)     $acc = $result->fetch(PDO::FETCH_OBJ);
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/email/include/mailaccounts.php  44)     $ret = ['account' => $acc->account, 'mailbox' => $acc->maildir,  'enabled' => ($acc->aktiv == 1)];
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/mailaccounts.php  45)     DEBUG(print_r($ret, true));
modules/email/include/mailaccounts.php  46)     return $ret;
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/include/mailaccounts.php   47) }
modules/imap/include/mailaccounts.php   48) 
modules/imap/include/mailaccounts.php   49) function change_mailaccount($id, $arr)
modules/imap/include/mailaccounts.php   50) {
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/mailaccounts.php  51)     $id = (int) $id;
modules/email/include/mailaccounts.php  52)     $uid = (int) $_SESSION['userinfo']['uid'];
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/email/include/mailaccounts.php  53)     $conditions = [];
modules/email/include/mailaccounts.php  54)     $values = [":id" => $id, ":uid" => $uid];
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/mailaccounts.php  55) 
modules/email/include/mailaccounts.php  56)     if (isset($arr['account'])) {
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/email/include/mailaccounts.php  57)         [$local, $domain] = explode('@', $arr['account'], 2);
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/mailaccounts.php  58)         if ($domain == config('masterdomain')) {
modules/email/include/mailaccounts.php  59)             $values[':domain'] = null;
modules/email/include/mailaccounts.php  60)         } else {
modules/email/include/mailaccounts.php  61)             $domain = new Domain((string) $domain);
modules/email/include/mailaccounts.php  62)             if ($domain->id == null) {
modules/email/include/mailaccounts.php  63)                 $values[":domain"] = null;
modules/email/include/mailaccounts.php  64)             } else {
modules/email/include/mailaccounts.php  65)                 $domain->ensure_userdomain();
modules/email/include/mailaccounts.php  66)                 $values[":domain"] = $domain->id;
modules/email/include/mailaccounts.php  67)             }
modules/email/include/mailaccounts.php  68)         }
modules/email/include/mailaccounts.php  69)         $values[":local"] = $local;
modules/email/include/mailaccounts.php  70)         $conditions[] = "local=:local";
modules/email/include/mailaccounts.php  71)         $conditions[] = "domain=:domain";
modules/email/include/mailaccounts.php  72)     }
modules/email/include/mailaccounts.php  73)     if (isset($arr['mailbox'])) {
modules/email/include/mailaccounts.php  74)         array_push($conditions, "`maildir`=:maildir");
modules/email/include/mailaccounts.php  75)         if ($arr['mailbox'] == '') {
modules/email/include/mailaccounts.php  76)             $values[":maildir"] = null;
modules/email/include/mailaccounts.php  77)         } else {
modules/email/include/mailaccounts.php  78)             $values[":maildir"] = $arr['mailbox'];
modules/email/include/mailaccounts.php  79)         }
modules/email/include/mailaccounts.php  80)     }
modules/email/include/mailaccounts.php  81) 
modules/email/include/mailaccounts.php  82)     if (isset($arr['password'])) {
Bernd Wurst add password strength check...

Bernd Wurst authored 5 years ago

modules/email/include/mailaccounts.php  83)         $result = strong_password($arr['password']);
modules/email/include/mailaccounts.php  84)         if ($result !== true) {
Hanno Böck Spaces between string conca...

Hanno Böck authored 1 year ago

modules/email/include/mailaccounts.php  85)             system_failure("Unsicheres Passwort: " . $result);
Bernd Wurst add password strength check...

Bernd Wurst authored 5 years ago

modules/email/include/mailaccounts.php  86)         }
Hanno Böck replace encrypt_mail_passwo...

Hanno Böck authored 1 year ago

modules/email/include/mailaccounts.php  87)         $encpw = gen_pw_hash($arr['password']);
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/mailaccounts.php  88)         array_push($conditions, "`password`=:password");
modules/email/include/mailaccounts.php  89)         $values[":password"] = $encpw;
modules/email/include/mailaccounts.php  90)     }
modules/email/include/mailaccounts.php  91) 
modules/email/include/mailaccounts.php  92)     if (isset($arr['enabled'])) {
modules/email/include/mailaccounts.php  93)         array_push($conditions, "`aktiv`=:aktiv");
modules/email/include/mailaccounts.php  94)         $values[":aktiv"] = ($arr['enabled'] == 'Y' ? 1 : 0);
modules/email/include/mailaccounts.php  95)     }
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/include/mailaccounts.php   96) 
modules/imap/include/mailaccounts.php   97) 
Hanno Böck Spaces between string conca...

Hanno Böck authored 1 year ago

modules/email/include/mailaccounts.php  98)     db_query("UPDATE mail.mailaccounts SET " . implode(",", $conditions) . " WHERE id=:id AND uid=:uid", $values);
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/mailaccounts.php  99)     logger(LOG_INFO, "modules/imap/include/mailaccounts", "imap", "updated account »{$id}«");
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/include/mailaccounts.php  100) }
modules/imap/include/mailaccounts.php  101) 
modules/imap/include/mailaccounts.php  102) function create_mailaccount($arr)
modules/imap/include/mailaccounts.php  103) {
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/email/include/mailaccounts.php 104)     $values = [];
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/include/mailaccounts.php  105) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/mailaccounts.php 106)     if (($arr['account']) == '') {
modules/email/include/mailaccounts.php 107)         system_failure('empty account name!');
modules/email/include/mailaccounts.php 108)     }
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/include/mailaccounts.php  109) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/mailaccounts.php 110)     $values[':uid'] = (int) $_SESSION['userinfo']['uid'];
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/include/mailaccounts.php  111) 
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/email/include/mailaccounts.php 112)     [$local, $domain] = explode('@', $arr['account'], 2);
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/mailaccounts.php 113)     if ($domain == config('masterdomain')) {
modules/email/include/mailaccounts.php 114)         $values[':domain'] = null;
modules/email/include/mailaccounts.php 115)     } else {
modules/email/include/mailaccounts.php 116)         $domain = new Domain((string) $domain);
modules/email/include/mailaccounts.php 117)         if ($domain->id == null) {
modules/email/include/mailaccounts.php 118)             $values[':domain'] = null;
modules/email/include/mailaccounts.php 119)         } else {
modules/email/include/mailaccounts.php 120)             $domain->ensure_userdomain();
modules/email/include/mailaccounts.php 121)             $values[':domain'] = $domain->id;
modules/email/include/mailaccounts.php 122)         }
bernd Erlaube wieder @schokokeks....

bernd authored 15 years ago

modules/email/include/mailaccounts.php 123)     }
bernd Domain-Klasse benutzen

bernd authored 17 years ago

modules/imap/include/mailaccounts.php  124) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/mailaccounts.php 125)     $values[':local'] = $local;
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/include/mailaccounts.php  126) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/mailaccounts.php 127)     if (isset($arr['mailbox'])) {
modules/email/include/mailaccounts.php 128)         if ($arr['mailbox'] == '') {
modules/email/include/mailaccounts.php 129)             $values[':maildir'] = null;
modules/email/include/mailaccounts.php 130)         } else {
modules/email/include/mailaccounts.php 131)             $values[':maildir'] = $arr['mailbox'];
modules/email/include/mailaccounts.php 132)         }
modules/email/include/mailaccounts.php 133)     }
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/include/mailaccounts.php  134) 
modules/imap/include/mailaccounts.php  135) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/mailaccounts.php 136)     if (isset($arr['password'])) {
Bernd Wurst add password strength check...

Bernd Wurst authored 5 years ago

modules/email/include/mailaccounts.php 137)         $result = strong_password($arr['password']);
modules/email/include/mailaccounts.php 138)         if ($result !== true) {
Hanno Böck Spaces between string conca...

Hanno Böck authored 1 year ago

modules/email/include/mailaccounts.php 139)             system_failure("Unsicheres Passwort: " . $result);
Bernd Wurst add password strength check...

Bernd Wurst authored 5 years ago

modules/email/include/mailaccounts.php 140)         }
Hanno Böck replace encrypt_mail_passwo...

Hanno Böck authored 1 year ago

modules/email/include/mailaccounts.php 141)         $values[':password'] = gen_pw_hash($arr['password']);
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/mailaccounts.php 142)     }
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/include/mailaccounts.php  143) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/mailaccounts.php 144)     if (isset($arr['enabled'])) {
modules/email/include/mailaccounts.php 145)         $values[':aktiv'] = ($arr['enabled'] == 'Y' ? 1 : 0);
modules/email/include/mailaccounts.php 146)     }
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/include/mailaccounts.php  147) 
modules/imap/include/mailaccounts.php  148) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/mailaccounts.php 149)     $fields = array_map(function ($k) {
modules/email/include/mailaccounts.php 150)         return substr($k, 1);
modules/email/include/mailaccounts.php 151)     }, array_keys($values));
Hanno Böck Spaces between string conca...

Hanno Böck authored 1 year ago

modules/email/include/mailaccounts.php 152)     db_query("INSERT INTO mail.mailaccounts (" . implode(',', $fields) . ") VALUES (" . implode(",", array_keys($values)) . ")", $values);
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/mailaccounts.php 153)     logger(LOG_INFO, "modules/imap/include/mailaccounts", "imap", "created account »{$arr['account']}«");
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/include/mailaccounts.php  154) }
modules/imap/include/mailaccounts.php  155) 
Hanno remove whitespace in empty...

Hanno authored 6 years ago

modules/email/include/mailaccounts.php 156) 
bernd Auch mailaccounts können si...

bernd authored 17 years ago

modules/imap/include/mailaccounts.php  157) function get_mailaccount_id($accountname)
modules/imap/include/mailaccounts.php  158) {
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/email/include/mailaccounts.php 159)     [$local, $domain] = explode('@', $accountname, 2);
bernd Auch mailaccounts können si...

bernd authored 17 years ago

modules/imap/include/mailaccounts.php  160) 
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/email/include/mailaccounts.php 161)     $args = [":local" => $local,
modules/email/include/mailaccounts.php 162)                 ":domain" => $domain, ];
bernd Auch mailaccounts können si...

bernd authored 17 years ago

modules/imap/include/mailaccounts.php  163) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/mailaccounts.php 164)     $result = db_query("SELECT acc.id FROM mail.mailaccounts AS acc LEFT JOIN mail.v_domains AS dom ON (dom.id=acc.domain) WHERE local=:local AND dom.domainname=:domain", $args);
modules/email/include/mailaccounts.php 165)     if (($result->rowCount() == 0) && ($domain == config('masterdomain'))) {
modules/email/include/mailaccounts.php 166)         unset($args[':domain']);
modules/email/include/mailaccounts.php 167)         $result = db_query("SELECT acc.id FROM mail.mailaccounts AS acc WHERE local=:local AND acc.domain IS NULL", $args);
modules/email/include/mailaccounts.php 168)     }
modules/email/include/mailaccounts.php 169)     if ($result->rowCount() != 1) {
modules/email/include/mailaccounts.php 170)         system_failure('account nicht eindeutig');
modules/email/include/mailaccounts.php 171)     }
modules/email/include/mailaccounts.php 172)     $acc = $result->fetch();
modules/email/include/mailaccounts.php 173)     return $acc['id'];
bernd Auch mailaccounts können si...

bernd authored 17 years ago

modules/imap/include/mailaccounts.php  174) }
Hanno remove whitespace in empty...

Hanno authored 6 years ago

modules/email/include/mailaccounts.php 175) 
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/include/mailaccounts.php  176) 
modules/imap/include/mailaccounts.php  177) function delete_mailaccount($id)
modules/imap/include/mailaccounts.php  178) {
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/mailaccounts.php 179)     $id = (int) $id;
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/email/include/mailaccounts.php 180)     db_query("DELETE FROM mail.mailaccounts WHERE id=?", [$id]);
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/mailaccounts.php 181)     logger(LOG_INFO, "modules/imap/include/mailaccounts", "imap", "deleted account »{$id}«");
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/include/mailaccounts.php  182) }
modules/imap/include/mailaccounts.php  183) 
modules/imap/include/mailaccounts.php  184) 
modules/imap/include/mailaccounts.php  185) function check_valid($acc)
modules/imap/include/mailaccounts.php  186) {
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/mailaccounts.php 187)     $user = $_SESSION['userinfo'];
Hanno Böck Spaces between string conca...

Hanno Böck authored 1 year ago

modules/email/include/mailaccounts.php 188)     DEBUG("Account-data: " . print_r($acc, true));
modules/email/include/mailaccounts.php 189)     DEBUG("User-data: " . print_r($user, true));
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/mailaccounts.php 190)     if ($acc['mailbox'] != '') {
Hanno Böck Spaces between string conca...

Hanno Böck authored 1 year ago

modules/email/include/mailaccounts.php 191)         if (substr($acc['mailbox'], 0, strlen($user['homedir']) + 1) != $user['homedir'] . '/') {
modules/email/include/mailaccounts.php 192)             return "Die Mailbox muss innerhalb des Home-Verzeichnisses liegen. Sie haben »" . $acc['mailbox'] . "« als Mailbox angegeben, Ihr Home-Verzeichnis ist »" . $user['homedir'] . "/«.";
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/mailaccounts.php 193)         }
Hanno Böck Fix not operator (!) spaces

Hanno Böck authored 1 year ago

modules/email/include/mailaccounts.php 194)         if (!check_path($acc['mailbox'])) {
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/mailaccounts.php 195)             return "Sie verwenden ungültige Zeichen in Ihrem Mailbox-Pfad.";
modules/email/include/mailaccounts.php 196)         }
modules/email/include/mailaccounts.php 197)     }
modules/email/include/mailaccounts.php 198) 
modules/email/include/mailaccounts.php 199)     if ($acc['account'] == '' || strpos($acc['account'], '@') == 0) {
modules/email/include/mailaccounts.php 200)         return "Es wurde kein Benutzername angegeben!";
modules/email/include/mailaccounts.php 201)     }
modules/email/include/mailaccounts.php 202)     if (strpos($acc['account'], '@') === false) {
Hanno Böck Spaces between string conca...

Hanno Böck authored 1 year ago

modules/email/include/mailaccounts.php 203)         return "Es wurde kein Domain-Teil im Account-Name angegeben. Account-Namen müssen einen Domain-Teil enthalten. Im Zweifel versuchen Sie »@" . config('masterdomain') . "«.";
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/mailaccounts.php 204)     }
modules/email/include/mailaccounts.php 205) 
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/email/include/mailaccounts.php 206)     [$local, $domain] = explode('@', $acc['account'], 2);
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/mailaccounts.php 207)     verify_input_username($local);
modules/email/include/mailaccounts.php 208)     $tmpdomains = get_domain_list($user['customerno'], $user['uid']);
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/email/include/mailaccounts.php 209)     $domains = [];
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/mailaccounts.php 210)     foreach ($tmpdomains as $dom) {
modules/email/include/mailaccounts.php 211)         $domains[] = $dom->fqdn;
modules/email/include/mailaccounts.php 212)     }
modules/email/include/mailaccounts.php 213) 
modules/email/include/mailaccounts.php 214)     if (array_search($domain, $domains) === false) {
modules/email/include/mailaccounts.php 215)         if ($domain == config('masterdomain')) {
modules/email/include/mailaccounts.php 216)             if (substr($local, 0, strlen($user['username'])) != $user['username'] || ($acc['account'][strlen($user['username'])] != '-' && $acc['account'][strlen($user['username'])] != '@')) {
Hanno Böck Spaces between string conca...

Hanno Böck authored 1 year ago

modules/email/include/mailaccounts.php 217)                 return "Sie haben »@" . config('masterdomain') . "« als Domain-Teil angegeben, aber der Benutzer-Teil beginnt nicht mit Ihrem Benutzername!";
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/mailaccounts.php 218)             }
modules/email/include/mailaccounts.php 219)         } else {
Hanno Böck Spaces between string conca...

Hanno Böck authored 1 year ago

modules/email/include/mailaccounts.php 220)             return "Der angegebene Domain-Teil (»" . htmlentities($domain, ENT_QUOTES, "UTF-8") . "«) ist nicht für Ihren Account eingetragen. Sollte dies ein Fehler sein, wenden sie sich bitte an einen Administrator!";
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/mailaccounts.php 221)         }
modules/email/include/mailaccounts.php 222)     }
modules/email/include/mailaccounts.php 223) 
modules/email/include/mailaccounts.php 224)     return '';
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/include/mailaccounts.php  225) }
modules/imap/include/mailaccounts.php  226) 
modules/imap/include/mailaccounts.php  227) 
bernd IMAP-Accounts deutlicher de...

bernd authored 15 years ago

modules/email/include/mailaccounts.php 228) function imap_on_vmail_domain()
modules/email/include/mailaccounts.php 229) {
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/mailaccounts.php 230)     $uid = (int) $_SESSION['userinfo']['uid'];
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/email/include/mailaccounts.php 231)     $result = db_query("SELECT m.id FROM mail.mailaccounts AS m INNER JOIN mail.virtual_mail_domains AS vd USING (domain) WHERE vd.hostname IS NULL AND m.uid=?", [$uid]);
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/mailaccounts.php 232)     if ($result->rowCount() > 0) {
modules/email/include/mailaccounts.php 233)         return true;
modules/email/include/mailaccounts.php 234)     }
modules/email/include/mailaccounts.php 235)     return false;
bernd IMAP-Accounts deutlicher de...

bernd authored 15 years ago

modules/email/include/mailaccounts.php 236) }
modules/email/include/mailaccounts.php 237) 
modules/email/include/mailaccounts.php 238) function user_has_only_vmail_domains()
modules/email/include/mailaccounts.php 239) {
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/mailaccounts.php 240)     $uid = (int) $_SESSION['userinfo']['uid'];
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/email/include/mailaccounts.php 241)     $result = db_query("SELECT id FROM mail.v_vmail_domains WHERE useraccount=?", [$uid]);
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/mailaccounts.php 242)     // User hat keine VMail-Domains
modules/email/include/mailaccounts.php 243)     if ($result->rowCount() == 0) {
modules/email/include/mailaccounts.php 244)         return false;
modules/email/include/mailaccounts.php 245)     }
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/email/include/mailaccounts.php 246)     $result = db_query("SELECT d.id FROM mail.v_domains AS d LEFT JOIN mail.v_vmail_domains AS vd USING (domainname) WHERE vd.id IS NULL AND d.user=?", [$uid]);
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/mailaccounts.php 247)     // User hat keine Domains die nicht vmail-Domains sind
modules/email/include/mailaccounts.php 248)     if ($result->rowCount() == 0) {
modules/email/include/mailaccounts.php 249)         return true;
modules/email/include/mailaccounts.php 250)     }
bernd Keine Domains => Dann auch...

bernd authored 15 years ago

modules/email/include/mailaccounts.php 251)     return false;