CodeIgniter Forums
Little help with session - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Little help with session (/thread-47519.html)



Little help with session - El Forum - 12-12-2011

[eluser]veledrom[/eluser]
Hi,

How can I echo [fullname] from [login_data]? Something like echo this $this->session->userdata('login_data')['fullname'];

Thanks

Code:
Array
(
    [session_id] => 6d7b85d3671e0a30152725729f3fb1cf
    [ip_address] => 127.0.0.1
    [user_agent] => Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.120 Safari/535.2
    [last_activity] => 1323704427
    [user_data] =>
    [login_data] => Array
        (
            [user_id] => 1
            [fullname] => My name goes here
            [email_address] => [email protected]
            [role] => admin
            [is_logged_in] => 1
        )
)