Results 1 to 4 of 4

Thread: username [solved]

  1. #1
    User
    Join Date
    07-06-09.
    Posts
    44

    Default username [solved]

    Hi forum,

    is there a way to get the user's name through a php code line?
    Something like:

    Code:
    $usr=$_SESSION['FORM_DATA']['user'];
    Thank you,
    Dan

  2. #2
    User
    Join Date
    06-19-09.
    Location
    Elbl?g, Poland
    Posts
    152

    Default Re: username

    In mod_logout_1cl.tpl template is:
    [code=php:237fk72g]<span class="syntaxhtml"><?php*echo*$this->loggedInAs;*?></span>[/code:237fk72g]
    Marcin

    http://www.contao.pl - Polish Support Site
    http://forum.contao.pl - Polish Contao community forum


    -----------------------
    Need custom template? Feel free to contact me by e-mail marcin@contao.pl

  3. #3
    Experienced user
    Join Date
    06-20-09.
    Posts
    1,311

    Default Re: username

    Frontend User (or Member)

    Code:
    if (FE_USER_LOGGED_IN)
    {
    	$this->import('FrontendUser', 'User');
    	$FrontendUserFirstName = $this->User->firstname;
    	$FrontendUserLastName = $this->User->lastname;
    	$FrontendUserID = $this->User->id;
    }
    etc....

    Backend User (or User) would be

    Code:
    if (BE_USER_LOGGED_IN) {
     $this->import('BackendUser', 'User');

  4. #4
    User
    Join Date
    07-06-09.
    Posts
    44

    Default Re: username

    Hi guys,

    following your explanation I was able to accomplish the desired operation.

    Thank you very much.
    Dan

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •