PDA

View Full Version : WHMCS Client login help!



Cixso
06-04-2013, 05:36 PM
I have a client login form for whmcs, but when the client logs in, I want that form to disappear and display the clients name etc like "Welcome Danny". Anybody know how?

Calum0812
06-04-2013, 05:41 PM
Hello,
The client homepage will be here:
/WHMCS/templates/[YOUR THEME]/clienthomepage.tpl.

Really easy to edit ;)

PM me if you need anything else. I've spent too much time coding for WHMCS...

Cixso
06-04-2013, 05:45 PM
I'm not sure if we are talking about the same thing, but I appreciate your response. I have the following code:

<form method="post" action="##">
<input type="hidden" name="token" value="##" />
<section id="call-to-action">

<div class="row">

<div class="nine columns">
<h4>Email Address: <input type="text" name="username" size="20" /> Password: <input type="password" name="password" size="20" /><br />
</h4></div>

<div class="three columns">

<input type="submit" value="Login" />

Basically, once that user logs in, I would like that div to then hide the login form and display text such as "Welcome $clientid" or whatever the string is for whmcs.

HarrySX
06-04-2013, 05:55 PM
<?php if( empty( $_SESSION['uid'] ) ) { ?><form method="post" action="##">
<input type="hidden" name="token" value="##" />
<section id="call-to-action">

<div class="row">

<div class="nine columns">
<h4>Email Address: <input type="text" name="username" size="20" /> Password: <input type="password" name="password" size="20" /><br />
</h4></div>

<div class="three columns">

<input type="submit" value="Login" />
<?php }
else {
echo "Welcome back!"
{ ?>

Untested.

Cixso
06-04-2013, 06:07 PM
<?php if( empty( $_SESSION['uid'] ) ) { ?><form method="post" action="##">
<input type="hidden" name="token" value="##" />
<section id="call-to-action">

<div class="row">

<div class="nine columns">
<h4>Email Address: <input type="text" name="username" size="20" /> Password: <input type="password" name="password" size="20" /><br />
</h4></div>

<div class="three columns">

<input type="submit" value="Login" />
<?php }
else {
echo "Welcome back!"
{ ?>

Untested.

Will test it shortly, much appreciated.

---------- Post added 06-04-2013 at 07:15 PM ----------

@HarrySX - doesn't appear to work. The whole login form is hidden when logged in or out.

Cixso
10-04-2013, 11:39 AM
Thought I would share this as I just came across this thread again;

{if $loggedin}

<div></div>

{else}

<form>
</form>

{/if}

HarrySX
10-04-2013, 12:11 PM
Thought I would share this as I just came across this thread again;

{if $loggedin}

<div></div>

{else}

<form>
</form>

{/if}

ah, that requires including WHMCS' core files. I thought you wanted to do this outside of the WHMCS install location.

Cixso
10-04-2013, 12:22 PM
ah, that requires including WHMCS' core files. I thought you wanted to do this outside of the WHMCS install location.

I do, but I also need this code for inside the installation. :P

HarrySX
10-04-2013, 12:24 PM
I do, but I also need this code for inside the installation. :P

ok, the code I provided will work as long as WHMCS is installed on the same domain, it checks for an active WHMCS cookie session. I'm not sure why it didn't work for you but I see Kieran; is viewing this thread so maybe he can help.

Cixso
10-04-2013, 12:26 PM
I haven't gave it another go since my first responce, I'll have another shot at it shortly.

Thanks for your help :)

Kieran
10-04-2013, 02:43 PM
Link me to where you're trying to do it and I'll have a look.

Cixso
14-04-2013, 07:33 PM
Hi guys

I need somebody with experience with WHMCS who is available to chat via Skype (text only) now. I am willing to offer cash.

**edit: coding experience

GoldenMerc
14-04-2013, 07:38 PM
HarrySX; I'd recommend

Cixso
14-04-2013, 08:01 PM
Nevermind.

I have finally found a fix from a 3 hour search.

Thanks anyway :)

Want to hide these adverts? Register an account for free!