Here are the changes I made to this mod, āACP Add Userā, so that it works together with the āSeparate Login and User Nameā mod. All changes were made manually to four files that came with the āACP Add Userā mod. If you are not comfortable making manual changes to your system, I suggest you do not attempt this. In any case, I suggest you make backup copies of the affected files should you run into trouble. As a disclaimer, if you decide to follow these steps, you are doing so at your own risk and I bear no responsibility whatsoever.
Step 1: Here I am assuming you already have āACP Add Userā installed. So the first step is to download and Install āSeparate Login and User Nameā mod. I suggest you should do this using AutoMOD. The āSeparate Login and User Nameā should work fine as expected but of course it will break the āACP Add Userā mod. So you need to follow the changes suggested in the next sequence of steps to restore it back to its normal function under the changes introduced by āSeparate Login and User Nameā.
Step2: Open the file:
adm/style/acp_add_user.html , and edit it as follows:
Find: Add After:Code: Select all
<dl>
<dt><label for="loginname">{L_LOGINNAME}:</label>
<br /><span>{L_LOGINNAME_EXPLAIN}</span></dt>
<dd><input class="medium" type="text" id="loginname" name="loginname" size="25" maxlength="40" value="{NEW_LOGINNAME}" /></dd>
</dl>
Step3: Open the file, includes/acp/acp_add_user.php, and edit it as follows:
(a) Find:Add After:Code: Select all
'loginname' => utf8_normalize_nfc(request_var('loginname', '', true)),
(b) Find:Add After:Code: Select all
'loginname' => array(
array('string', false, $config['min_name_chars'], $config['max_name_chars']),
array('loginname')),
(c) Find:Add After:Code: Select all
'loginname' => $data['loginname'],
(d) Find:Code: Select all
$messenger->headers('X-AntiAbuse: Username - ' . $user->data['username']);
Add After:Code: Select all
$messenger->headers('X-AntiAbuse: Loginname - ' . $user->data['loginname']);
(e) Find:Code: Select all
'WELCOME_MSG' => htmlspecialchars_decode(sprintf($user->lang['WELCOME_SUBJECT'], $config['sitename'])),
Add After:Code: Select all
'LOGINNAME' => htmlspecialchars_decode($data['loginname']),
(f) Find:Code: Select all
$sql = 'SELECT user_id, username, user_email, user_lang, user_jabber, user_notify_type
FROM ' . USERS_TABLE . ' ' .
$where_sql;
Replace with:Code: Select all
$sql = 'SELECT user_id, loginname, username, user_email, user_lang, user_jabber, user_notify_type
FROM ' . USERS_TABLE . ' ' .
$where_sql;
(g) Find:Code: Select all
'U_USER_DETAILS' => "$server_url/memberlist.$phpEx?mode=viewprofile&u=$user_id",
Add Before:Code: Select all
'LOGINNAME' => htmlspecialchars_decode($data['loginname']),
(h) Find:Code: Select all
'ERROR' => (sizeof($error)) ? implode('<br />', $error) : ''
Add After:Code: Select all
'NEW_LOGINNAME' => $data['loginname'],
'L_LOGINNAME_EXPLAIN'=> sprintf($user->lang[$config['allow_name_chars'] . '_EXPLAIN'], $config['min_name_chars'], $config['max_name_chars']),
Step4: Open the file: language/en/email/user_added_inactive.txt, and edit it as follows:
Find: Replace withStep 5: Repeat step 4 with this file: language/en/email/user_added_welcome.txtStep 6: Upload the updated files, refresh the template on your style (I am using prosilver) and purge the catch.
These are all the steps I followed and it worked for me. I hope someone finds these useful.