Jump to content

TCadmin username = email in WHMCS


Darrylglenn

Recommended Posts

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

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

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

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

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

  • 1 month later...
  • 1 month later...

Archived

This topic is now archived and is closed to further replies.

  • Who's Online   0 Members, 0 Anonymous, 23 Guests (See full list)

    • There are no registered users currently online
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Terms of Use