Darrylglenn Posted November 23, 2009 Share Posted November 23, 2009 Hello, Im using TCadmin_advanced. At this moment WHMCS creates a username based on front and lastname What I would like is that the login for WHCMS and TCadmin are the same. So the userID in TCadmin must be the email I fill in on WHMCS> I changed $billing_api_values["user_name"] = $params["Username"]; to: $billing_api_values["user_name"] = $params["email"]; But this won't work.. Any ideas? Link to comment Share on other sites More sharing options...
dimitrifrom31 Posted November 23, 2009 Share Posted November 23, 2009 I may be wrong but that question should be asked on WHMCS forums altho sum1 in here might be able to help you too. Link to comment Share on other sites More sharing options...
Santino Cid Posted November 23, 2009 Share Posted November 23, 2009 Try using: $billing_api_values["user_name"] = $params["clientsdetails"]["email"]; Link to comment Share on other sites More sharing options...
sgservers Posted November 25, 2009 Share Posted November 25, 2009 did this work? Link to comment Share on other sites More sharing options...
Steven Crothers Posted November 25, 2009 Share Posted November 25, 2009 That won't work, its to long. Link to comment Share on other sites More sharing options...
Santino Cid Posted November 25, 2009 Share Posted November 25, 2009 I have not tested it, but there is no reason it shouldn't. Just replace line 114 in your default_values.php with the one I supplied. Link to comment Share on other sites More sharing options...
Steven Crothers Posted November 26, 2009 Share Posted November 26, 2009 It wont work, emails are to long, which is the reason why it shouldn't work. Maximum login box size: 123456789123456 = 15 characters. The email would have to be 15 characters or less.... So like I said, it wont work. Link to comment Share on other sites More sharing options...
Admin-Nation-Servers Posted November 26, 2009 Share Posted November 26, 2009 Can't you just edit the tcadmin template to change the size? Link to comment Share on other sites More sharing options...
Santino Cid Posted November 26, 2009 Share Posted November 26, 2009 You can edit that, but that just makes stuff more complicated. What you can use is first initial last name. To take care of the size limit it will trim from the end of the last name. Here's the code: $un = $params["clientsdetails"]["firstname"]{0}.$params["clientsdetails"]["lastname"]; $billing_api_values["user_name"] = substr("$un", 0, 15); It's not exactly what you want, but it will make your TCAdmin a little tidier and easier for you to find servers for clients and such. Or just trim the email if you like: $billing_api_values["user_name"] = substr($params["clientsdetails"]["email"], 0, 15); Link to comment Share on other sites More sharing options...
Steven Crothers Posted November 26, 2009 Share Posted November 26, 2009 Can't you just edit the tcadmin template to change the size? No, you cannot. Please investigate the database schema for more details. Needless to say, when I say its impossible its after quite a bit of research, I'm not just saying its impossible for no reason. First letter, than last name would work - but in some cases it would indeed need to be trimmed. I personally like ID numbers. Link to comment Share on other sites More sharing options...
Santino Cid Posted November 26, 2009 Share Posted November 26, 2009 IDs are nice and not easily guessable. I'm sure it's passed in the params array from WHMCS, but I would not know what the key name is for it. You would need to ask the WHMCS people or guess it. Going on from what Steven noted: You can edit that field in the template, but the column in MySQL is probably set to a 15 character VARCHAR. Then you would need to make changes in the admin part and so on. Like I said, complicated and unnecessary. Link to comment Share on other sites More sharing options...
DougK94 Posted November 26, 2009 Share Posted November 26, 2009 And if playing with the MySQL character lengths, you may cause problems down the road with upgrades. Link to comment Share on other sites More sharing options...
Darrylglenn Posted November 27, 2009 Author Share Posted November 27, 2009 Thanks for all the reactions. I made a support ticket if the lenght could be changed. ------------------------------------------ Luis Alvarenga Staff Posted: 2009/11/24 09:27 In TCAdmin 2 you will have a longer user id. Luis Alvarenga ------------------------------------------ Does anybody know when it will be released? IDs are nice and not easily guessable. How do I use ID's, the username is now based on front and last name.. Thanks! Link to comment Share on other sites More sharing options...
Darrylglenn Posted December 29, 2009 Author Share Posted December 29, 2009 How do I use ID's, the username is now based on front and last name.. Can someone answer this question? I tried: $billing_api_values["user_name"] = $params["Userid"] $billing_api_values["user_name"] = $params["clientid"] Link to comment Share on other sites More sharing options...
Darrylglenn Posted January 4, 2010 Author Share Posted January 4, 2010 Nobody? Link to comment Share on other sites More sharing options...
Santino Cid Posted January 6, 2010 Share Posted January 6, 2010 I'm sure it's passed in the params array from WHMCS, but I would not know what the key name is for it. You would need to ask the WHMCS people or guess it. They will be able to help you more than we probably can. Link to comment Share on other sites More sharing options...
kuzmi4 Posted February 21, 2010 Share Posted February 21, 2010 Can someone answer this question? I tried: $billing_api_values["user_name"] = $params["Userid"] $billing_api_values["user_name"] = $params["clientid"] Use: $billing_api_values["user_name"] = $params["clientsdetails"]["userid"]; Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.