| | |
| | | |
| | | // Advanced rights |
| | | $attrib['id'] = 'advancedrights'; |
| | | foreach ($supported as $idx => $val) { |
| | | foreach ($supported as $key => $val) { |
| | | $id = "acl$val"; |
| | | $ul .= html::tag('li', null, |
| | | $input->show('', array( |
| | | 'name' => "acl[$val]", 'value' => $val, 'id' => $id)) |
| | |
| | | if (!$acl || !$user || !strlen($mbox)) { |
| | | continue; |
| | | } |
| | | |
| | | $user = $this->mod_login($user); |
| | | $username = $this->mod_login($username); |
| | | |
| | | if ($user != $_SESSION['username'] && $username != $_SESSION['username']) { |
| | | if ($this->rc->storage->set_acl($mbox, $user, $acl)) { |
| | |
| | | |
| | | return $this->ldap->ready; |
| | | } |
| | | |
| | | /** |
| | | * Modify user login according to 'login_lc' setting |
| | | */ |
| | | protected function mod_login($user) |
| | | { |
| | | $login_lc = $this->rc->config->get('login_lc'); |
| | | |
| | | if ($login_lc === true || $login_lc == 2) { |
| | | $user = mb_strtolower($user); |
| | | } |
| | | // lowercase domain name |
| | | else if ($login_lc && strpos($user, '@')) { |
| | | list($local, $domain) = explode('@', $user); |
| | | $user = $local . '@' . mb_strtolower($domain); |
| | | } |
| | | |
| | | return $user; |
| | | } |
| | | } |