Knowledge Base

How to increase the username limits to 30?

DirectAdmin allows usernames up-to 30 chars now but Blesta still says between 4-8 in versions up-to (eta).

To increase the value you need to go to: /components/modules/direct_admin/direct_admin.php

Find:

'direct_admin_username' => [
                'format' => [
                    'if_set' => true,
                    'rule' => ['matches', '/^[a-z0-9]*$/i'],
                    'message' => Language::_('DirectAdmin.!error.direct_admin_username.format', true)
                ],
                'length' => [
                    'if_set' => true,
                    'rule' => ['betweenLength', 4, 8],
                    'message' => Language::_('DirectAdmin.!error.direct_admin_username.length', true)
                ]
            ],

Replace it with:

'direct_admin_username' => [
                'format' => [
                    'if_set' => true,
                    'rule' => ['matches', '/^[a-z0-9]*$/i'],
                    'message' => Language::_('DirectAdmin.!error.direct_admin_username.format', true)
                ],
                'length' => [
                    'if_set' => true,
                    'rule' => ['betweenLength', 4, 30],
                    'message' => Language::_('DirectAdmin.!error.direct_admin_username.length', true)
                ]
            ],
Please rate this article to help us improve our Knowledge Base.

0 0