close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

UserRegistrationsolution Pack first name on log in

Thread began 9/25/2012 3:23 pm by also172389524 | Last modified 2/20/2014 1:42 pm by hector | 3593 views | 10 replies |

also172389524

UserRegistrationsolution Pack first name on log in

Hello I am trying to display the first name of the person instead of the e-mail. I have tried multiple ways including of of which was described previously by Jason Byrnes webassist support tech. I have tried this: <?php echo "Welcome, ".$row_welcome['UserFirstName']; ?> and this: <?php @sesssion_start(); ?>
<?php if(isset($_SESSION['UserFirstName'])) { ?>
Welcome <?php echo $_SESSION['UserFirstName']; ?>
<?php } ?> but I get a huge error code on the webpage. I'm using Wamp as a test server right now. Is there an easier way to be able to display users name after the person have logged in? Thank you.

Sign in to reply to this post

Jason ByrnesWebAssist

first, on the login page, you need to edit the code to store the user name in a session.


find the following code:

php:
"sessionColumns" => explode($WA_Auth_Separator,"UserID".$WA_Auth_Separator."UserEmailVerified".$WA_Auth_Separator."UserEmail"),
    "sessionNames" => explode($WA_Auth_Separator,"UserID".$WA_Auth_Separator."UserEmailVerified".$WA_Auth_Separator."UserEmail"),



and change it to:

php:
"sessionColumns" => explode($WA_Auth_Separator,"UserID".$WA_Auth_Separator."UserEmailVerified".$WA_Auth_Separator."UserEmail".$WA_Auth_Separator."UserFirstName"),
    "sessionNames" => explode($WA_Auth_Separator,"UserID".$WA_Auth_Separator."UserEmailVerified".$WA_Auth_Separator."UserEmail".$WA_Auth_Separator."UserFirstName"),




then you can use this code to show the user session:

php:
<?php 
@session_start();
echo(isset(
$_SESSION['UserFirstName'])?$_SESSION['UserFirstName']:""); 
?>
Sign in to reply to this post

also172389524

name display in log in page

Hey i have tried to do this to display the first name on the log in page but did not work, this is what I did: find the following code:

PHP:
---------
"sessionColumns" => explode($WA_Auth_Separator,"UserID".$WA_Auth_Separator."UserEmailVerified".$WA_Auth_Separator."UserEmail"),
"sessionNames" => explode($WA_Auth_Separator,"UserID".$WA_Auth_Separator."UserEmailVerified".$WA_Auth_Separator."UserEmail"),
---------
and change it to:

PHP:
---------
"sessionColumns" => explode($WA_Auth_Separator,"UserID".$WA_Auth_Separator."UserEmailVerified".$WA_Auth_Separator."UserEmail".$WA_Auth_Separator."UserFirstName"),
"sessionNames" => explode($WA_Auth_Separator,"UserID".$WA_Auth_Separator."UserEmailVerified".$WA_Auth_Separator."UserEmail".$WA_Auth_Separator."UserFirstName"),
---------

then you can use this code to show the user session:

PHP:
---------
<?php
@session_start();
echo(isset($_SESSION['UserFirstName'])?$_SESSION['UserFirstName']:"");
?>
--------- Is there another way to make this work or what am I doing wrong.

Sign in to reply to this post

also172389524

Log in Page forst anme display

By the way I use wamp as a test server.

Sign in to reply to this post

also172389524

first name on registration

Hey I got it to work, what was happening was that I needed to log out and log back in to see the results, i dont know if it is due to that Im using wamp as a server tester. Anyway I love it the way it is working, but I also would like to be able to have some thing like this if the user does not have a name on the registration form. Hello (Please register Here) so that when the person would register then this would be removed and then the name would appear, the thing is that Im not sure that the person have to be register before being able to log in, I bought the registration solution pack, anyway thanks for all the help.

Sign in to reply to this post

Jason ByrnesWebAssist

you could use an if statement to check if the Username is blank:

php:
<?php 

@session_start();
if(isset(
$_SESSION['UserFirstName']) && $_SESSION['UserFirstName'] == "") {
echo(
"Please update your profile");
?>
Sign in to reply to this post

hector

Hello I am new with web design i am trying to display the first name of the person or email but when i load the page it is showing me only the name and the content is not there this is what i am doing thank you so much for your help :


<?php
@session_start();
echo(isset($_SESSION['UserFirstName'])?$_SESSION['UserFirstName']:"");

Sign in to reply to this post

Jason ByrnesWebAssist

You need to edit the Security Assist Authenticate user server behavior, on the session tab, click the plus button and select the user first name column to have it saved to a session on login.


NOTE: in the future, please don't paste the code for you page into the message, instead attach the php page as an attachment.

Sign in to reply to this post

hector

Thank you , sorry now i know for the next time and thank you so much for your help. I changed the code. Your answered help me a lot but now I only have a problem when I logout and I click back in the browser I still login but if I delete the link on the browser and write down again it show me that I am logout how can I logout even if i click back in the browser I want to be logout? thank you again

Sign in to reply to this post

Jason ByrnesWebAssist

you cant, that is the problem with the back button, it does not reload the page, it loads the page from the browser history. don't rely on the back button.

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...