Jump to content
Froxlor Forum

d00p

Administrators
  • Posts

    10328
  • Joined

  • Last visited

  • Days Won

    43

Posts posted by d00p

  1. `-s` = show parameters, that won't run the `Customers.add` API call.

    The commands call is the following:

    froxlor:api-call [options] [--] <user> <api-command> [<parameters>]

    Also:

    Arguments:
      user                  Loginname of the user you want to run the command as
      api-command           The command to execute in the form "Module.function"
      parameters            Paramaters to pass to the command as JSON array

    The API doc for adding customers can be found here: https://docs.froxlor.org/latest/api-guide/commands/customers.html#customers-add

  2. You need to have default_pass_scheme unset/commented out. Seems like you have very old passwords (e.g. not set with froxlor 0.10 or later, those that do not start with {hash-algorithm}

    Search the forum, there is a topic where this is discussed.

    Iirc either re-set the passwords so they will be stored in the new way or make a dovecot post-login-password-convert-script that updates password hashes after POP3/IMAP Login 

  3. Ah from cli, there's no user-session there, try this:

    diff --git a/lib/Froxlor/Domain/IpAddr.php b/lib/Froxlor/Domain/IpAddr.php
    index 1c6f5cdf..c53eeac7 100644
    --- a/lib/Froxlor/Domain/IpAddr.php
    +++ b/lib/Froxlor/Domain/IpAddr.php
    @@ -55,6 +55,7 @@ class IpAddr
    
            /**
             * @return array
    +        * @throws \Exception
             */
            public static function getSslIpPortCombinations(): array
            {
    @@ -75,7 +76,7 @@ class IpAddr
                    $additional_conditions_params = [];
                    $additional_conditions_array = [];
    
    -               if ($userinfo['ip'] != '-1') {
    +               if (!empty($userinfo) && $userinfo['ip'] != '-1') {
                            $admin_ip_stmt = Database::prepare("
                                    SELECT `id`, `ip`, `port` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `id` = IN (:ipid)
                            ");

     

  4. Hm it's related to the navigation menu and it checks for customer stuff but you're admin, can you try this patch:

    diff --git a/lib/navigation/00.froxlor.main.php b/lib/navigation/00.froxlor.main.php
    index f322fe85..9863ce54 100644
    --- a/lib/navigation/00.froxlor.main.php
    +++ b/lib/navigation/00.froxlor.main.php
    @@ -38,7 +38,7 @@ return [
                                            'url' => 'customer_email.php?page=emails',
                                            'label' => lng('menue.email.emails'),
                                            'required_resources' => 'emails',
    -                                       'add_shortlink' => CurrentUser::canAddResource('emails') ? 'customer_email.php?page=email_domain&action=add' : null,
    +                                       'add_shortlink' => !CurrentUser::isAdmin() && CurrentUser::canAddResource('emails') ? 'customer_email.php?page=email_domain&action=add' : null,
                                    ],
                                    [
                                            'url' => Settings::Get('panel.webmail_url'),
    @@ -60,7 +60,7 @@ return [
                                            'url' => 'customer_mysql.php?page=mysqls',
                                            'label' => lng('menue.mysql.databases'),
                                            'required_resources' => 'mysqls',
    -                                       'add_shortlink' => CurrentUser::canAddResource('mysqls')? 'customer_mysql.php?page=mysqls&action=add' : null,
    +                                       'add_shortlink' => !CurrentUser::isAdmin() && CurrentUser::canAddResource('mysqls')? 'customer_mysql.php?page=mysqls&action=add' : null,
                                    ],
                                    [
                                            'url' => Settings::Get('panel.phpmyadmin_url'),
    @@ -81,7 +81,7 @@ return [
                                    [
                                            'url' => 'customer_domains.php?page=domains',
                                            'label' => lng('menue.domains.settings'),
    -                                       'add_shortlink' => CurrentUser::canAddResource('subdomains') ? 'customer_domains.php?page=domains&action=add' : null,
    +                                       'add_shortlink' => !CurrentUser::isAdmin() && CurrentUser::canAddResource('subdomains') ? 'customer_domains.php?page=domains&action=add' : null,
                                    ],
                                    [
                                            'url' => 'customer_domains.php?page=sslcertificates',
    @@ -98,7 +98,7 @@ return [
                                    [
                                            'url' => 'customer_ftp.php?page=accounts',
                                            'label' => lng('menue.ftp.accounts'),
    -                                       'add_shortlink' => CurrentUser::canAddResource('ftps') ? 'customer_ftp.php?page=accounts&action=add' : null,
    +                                       'add_shortlink' => !CurrentUser::isAdmin() && CurrentUser::canAddResource('ftps') ? 'customer_ftp.php?page=accounts&action=add' : null,
                                    ],
                                    [
                                            'url' => Settings::Get('panel.webftp_url'),

     

  5. Could you please verify whether this fixes the issue?

    diff --git a/lib/Froxlor/Api/Commands/SubDomains.php b/lib/Froxlor/Api/Commands/SubDomains.php
    index ed8f49fc..c38fd9bf 100644
    --- a/lib/Froxlor/Api/Commands/SubDomains.php
    +++ b/lib/Froxlor/Api/Commands/SubDomains.php
    @@ -1047,7 +1047,7 @@ class SubDomains extends ApiCommand implements ResourceEntity
                                    $custom_list_result = $_custom_list_result['list'];
                            }
                            $customer_ids = [];
    -                       $customer_stdsubs = [];
    +                       $customer_stdsubs = [0=>0];
                            foreach ($custom_list_result as $customer) {
                                    $customer_ids[] = $customer['customerid'];
                                    $customer_stdsubs[$customer['customerid']] = $customer['standardsubdomain'];

     

  6. Froxlor benötigt seine eigene Domain, es kann aber natürlich auch keine Subdomain sein.

    Wenn du "meinfroxlor.de" selbst (als Kunde) für E-Mails usw. nutzen willst, darf der Froxlor-Systemhostname nicht "meinefroxlor.de" sein. Du kannst das z.B. auf "froxlor.meinfroxlor.de" setzen oder was auch immer dir beliebt.

    Sofern jetzt schon standard-subdomains für kunden existieren (kunde1.meinfroxlor.de usw.) solltest du nach anpassung des Froxlor-Systemhostnames bei jedem Kunden das einmal deaktivieren und im Anschluss wieder aktivieren, damit korrekte Standardsubdomains erstellt werden (z.B. dann kunde1.froxlor.meinfroxlor.de)

×
×
  • Create New...