PLEASE, I BEG YOU! How can I have a label dynamically see the current user loggedin FirstName and LastName in my database?

I have a HBox that becomes visible when a user is valid. The HBox contains a logout button, and a label. How can I get the label dynamically see the current user loggedin FirstName and LastName in my database? Below, I have included my element HBox and ColdFusion. ANY helpwould be appreciated!



< < < < < < MY component LoginHBox.mxml starts HERE > > > > > > >
< mx:HBox
' xmlns:MX =' http://www.adobe.com/2006/mxml '
Width = '100% '.
height = "28".
horizontalAlign = "right."
verticalAlign = "middle".
paddingRight = "10" >

"" < mx:Script source = "... / actionScript/logout.as" / >

<!-App connects to ColdFusion using Flash Remoting STARTS->
< mx:RemoteObject
ID = "cfService_LoginCFC".
destination = "ColdFusion".
source="WebsiteApplication.CFC.LoginCFC"/ >
<!-App connects to ColdFusion using Flash Remoting END->

< mx:Label id = "welcomeLabel".
Text = "Welcome"... "/ > < < < < HOW can I get the text dynamically see the users registered in FirstName and LastName?

<! - logoutResultHandler() of the points of function in the file logout.as - >
< mx:Button id = "logoutButton.
label = "Log" Out
Click = "logoutResultHandler ()" / >

< / mx:HBox >
< < < < < < MY component LoginHBox.mxml ends HERE > > > > > > >



< < < < < < MY component LoginCFC.cfc starts HERE > > > > > > >
< cfproperty >

<!-function loginUser STARTS->
< name cffunction = "loginUser" access = "remote" returntype = "WebsiteApplication.cfc.UserCFC" >
< cfargument = 'user name' name type = "string" required = "true" >
< name cfargument = "password" type = "string" required = "true" >

<!-the default user is not logged in->
< cfset var user = createObject ("component", "UserCFC") >

< cfquery name = "loginQuery" dataSource = "TheChurchOnFire" >
SELECT the name of user, password, AccessLevelID, FirstName, LastName
FROM dbo. MembershipInfo
WHERE
Username = "#username #
AND password = ' #password #
< / cfquery >
<!-the cfif instructionsuivante is absolutely fundamental in the achievement of the
fully functional authentication-> process
< cfif EQ loginQuery.Username ' #username # ' loginQuery.Password AND EQ ' #password # ' >
< cfset user .loggedin = true >
< cfset user .username = "#username #" >
< cfset user .roles = "#loginQuery.AccessLevelID #" >
< cfreturn user >
< cfelseif > #username # EQ 'username' AND #password # EQ 'password '.
< cfset user .loggedin = true >
< cfset user .username = "#username #" >
< cfset user .roles = "6" >
< cfreturn user >
< cfelse >
< cfreturn user >
< / cfif >

< / cffunction >
<! - function loginUser ENDS - >

< / cfproperty >
< < < < < < MY component LoginCFC.cfc ends HERE > > > > > > >

Thank you

John

I finally thought to it! PRAISE BE TO GOD!

I had to add...

welcomeLabel.text ='Welcome, you are currently logged in as + currentUser.fullname + '!';

.. .for my loginResultHandler.

function loginResultHandler
private void loginResultHandler(event:ResultEvent):void
{
currentUser = event.result as a user;
If (currentUser.loggedIn)
{
If successful login
If (currentUser.roles == '5')
{
this.currentState = 'Youth';
welcomeLabel.text ='Welcome, you are currently logged in as + currentUser.fullname + '!';
}
Else if (currentUser.roles == '4')
{
this.currentState = 'Member';
welcomeLabel.text ='Welcome, you are currently logged in as + currentUser.fullname + '!';
}
Else if (currentUser.roles == '3')
{
this.currentState = 'PowerMember';
welcomeLabel.text ='Welcome, you are currently logged in as + currentUser.fullname + '!';
}
Else if (currentUser.roles == '2')
{
this.currentState = 'AssistantAdministrator';
welcomeLabel.text ='Welcome, you are currently logged in as + currentUser.fullname + '!';
}
Else if (currentUser.roles == '1')
{
this.currentState = 'SeniorAdministrator';
welcomeLabel.text ='Welcome, you are currently logged in as + currentUser.fullname + '!';
}
on the other
{
currentUser.roles == "6";
this.currentState = 'Visitor';
welcomeLabel.text = 'Welcome, you are currently logged in as visitor!';
}
}
on the other
{
If unsuccessful login
Alert.Show ("unsuccessful Login", "Server authentication");
}
}

Michael_ramirez44 thanks for your help!

John

Tags: Flex

Similar Questions

  • Help! Please, I beg you. Can I use Bell Internet Security Services offers after I installed Dreamweaver on my PC?

    I installed Dreamweaver in my PC. Dreamweaver seems to work very well. However, Dreamweaver executes automatically when I run the virus scan using the Bell Internet Security Services. How can I avoid that Dreamweaver running and control of work of the Security Services Bell Internet analysis of the virus?

    Post edited by: leslie6

    Hi leslie6,

    The question has been answered and resolved in the http://forums.adobe.com/message/5204300#5204300 thread started by you.

  • At the login page, our administrator is the user can't find anywhere and the connection we have is a standard user. How can I get an active Admin in the standard user user?

    We tried to implement the standard user to have limited access to the computer so that when we have people over, now, I can't able to carry anything as an admin if I right click on the menu on the icons. I am also unable to install new programs. The console command does not work for me to do that either, net user administrator / Active: Yes, just gives me an error code.

    No luck. I tried to start in safe mode. The computer turns off automatically, and I had to make a fix to start. I now think I need to do a full reset, but did not have my vista copy from when I bought this computer. Is there a way to get a new copy without having to buy a new set of software?

    Call the manufacturer of your computer. Request a set of recovery disks. Total cost is minimal, and it's a set that you should / must have.

    The set allows to restore your computer.

    Sure, if you are able to back up files that you want to keep before launching the recovery disks.

  • How can I HAVE me to stop moving the elements of design de.0139 in. (1 pt) increments?

    For the life of me, I can't find a way to get the Illustrator do NOT align or move each item in each document according to the segments of 1.0 pt. This has happened for a couple weeks now and it makes me POSITIVEMENT BATTY! I have no idea what setting I changed inadvertently, but if I try to set the position of the object to 0.46, it will spontaneously change a.4653 inches. If I use the arrow, the object will move a.4514 inches, but I can't put one anywhere between the two settings. All traits cannot EXACTLY 1,000 pt or pt pt 2,000 or 3,000 or... I NEED a special feature to be 1.25 pt, BUT IT IS IMPOSSIBLE to DEFINE IT SO THAT the WIDTH!

    I tried to change the settings of the pixel grid alignment; Snap to grid; Snap to grid of Perspective; Preferences > keyboard increment; off align Guides; turn off Smart Guides... and 1 million other settings!

    I'm at the end of my small piece... SOMEONE HELP ME PLEASE!

    JOHN

    Turn off align it on the grid of pixels on the Board to turn.

  • How can I open a new window without the current tabs being replicated?

    I have a window open with several tabs. I open a new window and the current tabs are replicated - I'm waiting for the new window empty - what am I doing wrong? Should what settings I change. I'm running Firefox on a MacBook Pro with Snow Leopard OS.

    This has happened

    Each time Firefox opened

    Firefox support Home page (s) by default in a new window.
    If you see something else, then check your extensions (Tools > Modules > Extensions) to see if one of them is the cause.
    See Troubleshooting extensions and themes and problems of hardware acceleration to resolve common Firefox problems

    How to open this new window?

  • How can I stop Windows Media Player from the addition of music, videos and photos of ALL of my files?

    Basically whats happening is my windows media player added basically never picture, song and video I have of EACH SINGLE FOLDER on my laptop, and I mean every file. even files with about 1000 mp3 files each inside, when there long about 1 second. It's ridiculous and now my laptop has become very slow, I can't keep open media player for as long as it keeps crashing added and updated files per second, now I can't even listen to my XBOX it became so lag.

    any help what so ever would be greatly appreciated.                                Thank you very much

    Hello

    Step 1: Launch the Media Player settings troubleshooter.

    http://Windows.Microsoft.com/en-us/Windows7/open-the-Windows-Media-Player-settings-Troubleshooter

    Step 2: To remove a folder monitored by the player, see the article:

    http://Windows.Microsoft.com/en-us/Windows7/add-items-to-the-Windows-Media-Player-library

  • Photosmart 8250 not recognized by my iMAC... How can I get my iMAC to 'see' the printer?

    I'm trying to connect my HP Photosmart 8250 printer to my iMAC (under Snow Leopard 10.6.4) via the USB cable. I downloaded and installed the drivers for HP printers on Apple's site, but when I go through the "Print & Fax' tile instead of '+' and then 'add printer' is not in the list of printers as if the iMAC does not see the printer...» Help please.

    Thanks for the help... Initially, I tried reseting the printing system, but has not helped.

    Ultimately after some trial and error, it seems the HP Photosmart printer is somehow 'paired' / 'connected' with my MacBook Pro. So he can register on my iMAC, you must remove first of the queue on the MBP and then it appears on the iMAC and may be included in the queue on the iMAC... even if it's just through a USB cable.

    Thank you.

  • How can I get my LOF to see the chapter numbers and page?

    I work in FM 11. My document has a TOC, BATCH, and LOF. My LOF would not be up-to-date, so I created a new one from scratch, but can't seem to get the LOF to display the chapter number in the Figure number and the page number. The format should be TitreFigure X - Y Figure... X Z. Where X is the chapter of the source, there is the number listed in this chapter, and Z is the number of page (Figure 1 - 1 Architecture... 1-5 showing the first figure in Chapter 1 is on page 5 of Chapter 1.)

    The reference page for the PRIZE which is correct:

    LOT_Ref_pg.PNG

    Compared to the reference page for the LOF that shows me only consecutive numbers and a page without the chapter prefix numbers:

    LOF_RefPg.PNG

    I tried to copy the reference to the table of contents or the BATCH page. My LOF looks like this:

    LOF.PNG

    You must add the <$chapnum>component in all relevant places you want FM to display the chapter number (see the table of contents for examples). You will also need to change some of your paratags to be included in the automatic numbering (if your content is using this combo of num chapter-figure in your chapter documents).

    Also insert the tabs in page reference LOF definitions, but use the code '\t' instead of a tab character so that you know that a tab command was specified. Change the corresponding paratags to include the desired tab stops. (for example for Figure_TitleLOF you should have something like "<$paranum><$paratext>\t \t<$chapnum>-<$pagenum>").

  • PLEASE, I BEG YOU! Can I change this SUPER UGLY 2015 Illustrator SPLASH SCREEN? ... scares me whenever I open it

    .. which brings me to this app that I used to love to hate

    Help please!

    Yes. See my response here:

    Who is responsible for the boot image HAVE?

  • How can I have my new messages at the top of my screen rather than at the end?

    When new messages arrive, they are after my old messages and I want they to be displayed at the top of the screen.

    Click on the heading of column titled DATE.
    By clicking on any header performs a sort on this column. Clicking the same header again reverses the sort order.

  • How can I build AMPscript to dynamically display the text in the exact target?

    I have the following AMPscript to display the images. Now, I need to create an AMPscript to display the copy of the notice in the footer of that image. I also created a content within the exact target area, but I cannot know how to reference it in an email from paste HTML.

    %%[

    var @DynamicFeatureImage1, @DynamicFeatureLink1, @ClosestStore

    Set @ClosestStore = ClosestStore

    If @ClosestStore is "Store1" then set @DynamicFeatureImage1 = 'IMAGE URL '.

    ElseIf

    @ClosestStore is "Store2" then set @DynamicFeatureImage1 = 'IMAGE URL'.

    on the other

    Set @DynamicFeatureImage1 = 'IMAGE URL '.

    endif

    If @ClosestStore is "Store1" then set @DynamicFeatureLink1 = 'Link TO IMAGE'

    ElseIf

    @ClosestStore is "Store2" then set @DynamicFeatureLink1 = 'link TO IMAGE'

    on the other

    Set @DynamicFeatureLink1 = "link TO IMAGE".

    endif

    ]%%

    Dreamweaver does not support AMPScript. It is a language created by Salesforce. You'd better ask a question in the riding of Salesforce stack: most recent "ampscript" issues - Salesforce stack Exchange.

  • How can I get my site to make the current version of the page, not the cached version?

    @

    Hello

    To disable the browser, caching for a web page, try adding the following code to the page's Head tag:

    To add the same:

    (1) open the page with Muse

    (2) in the Page menu, select Page Properties

    (3) in the metadata tab, type the code in the HTML code "for".field «»

    Concerning

    Sonam

  • j can't install a driver on my xp IE, you need freamwork pilot 2 How can I have?

    j can't install a driver on my xp IE, you need freamwork pilot 2 How can I have?

    Downloads for the framework:
    http://msdn.Microsoft.com/en-us/netframework/aa569263.aspx

    NB: : .NET Framework 3.5 SP1 (this will install the .NET Framework 2.0 SP2 and 3.0 SP2)

  • How to check the current values of COMMIT_WAIT and COMMMIT_LOGGING

    Is it possible that you can check in a session to determine the current settings for COMMIT_WAIT and COMMMIT_LOGGING? I am not referring to a situation where they are defined via ALTER SYSTEM and changed the world, but changed using ALTER SESSION and locally defined. I'm currently testing a trigger to do it for a very specific batch user and just need to be able to log on and check if the adjustment was established successfully or not.

    >
    Is it possible that you can check in a session to determine the current settings for COMMIT_WAIT and COMMMIT_LOGGING?
    >
    Well, since these are the initialization parameters, you can check the PARAMETER V view $

    select name, value from v$parameter
    where name like 'commit%'
    
    NAME,VALUE
    commit_point_strength,1
    commit_write,
    commit_wait,
    commit_logging,
    

    And after changing their

    alter session set commit_logging = 'IMMEDIATE';
    alter session set commit_wait = 'FORCE_WAIT' ;
    
    NAME,VALUE
    commit_point_strength,1
    commit_write,
    commit_wait,FORCE_WAIT
    commit_logging,IMMEDIATE
    
  • Hello, I would like to connect my behance account to a new email address (because I was hacked on the former) how can I do? Please, I beg you.

    Hello, I would like to connect my behance account to a new email address (because I was hacked on the former) so obviously I have more access to it. but I don't want to lose my account. How can I do? Please, I beg you.

    You can contact Adobe support for the resolution of https://helpx.adobe.com/contact.html

    I also understand that there is an obligation to communicate with the support of behance too.

    Concerning

    Stéphane

Maybe you are looking for