[solved] Getting Username and Fullname within Module Script / Theme

syscologne

Joined: 2003-05-20
Posts: 37
Posted: Sun, 2013-01-06 03:47

Hi,

From within a module I would like to print out the username and the full name of the user currently logged into Gallery3. Is there a method to an active class or a php variable that is filled with this information to accomplish this?

Thanks

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sun, 2013-01-06 06:17
<p>
  Hello <b><?= identity::active_user()->name ?></b>!
</p>
<p>
  You’re looking at <?= $item->title ?> which was
  uploaded by <?= $item->owner->name ?>
</p>

Dave
____________________________________________
Blog & G2 || floridave - Gallery Team

 
syscologne

Joined: 2003-05-20
Posts: 37
Posted: Sun, 2013-01-06 06:30

Great - that gives me the login name. How would I get the full / real Name?

Where is this defined?
Thanks
Lutz

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2013-01-07 04:01

identity::active_user()->full_name should work.
I'm sure you will find:
https://docs.google.com/document/pub?id=1DQ1Tz177aX5ZsSgEbjYtYOBufJ0SYhgYvfJtA6snn2Y
useful

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
syscologne

Joined: 2003-05-20
Posts: 37
Posted: Sun, 2013-01-13 20:12

Thanks - your suggestion solved it.
Find the developer's guide very helpful - looking forward to seeing it grow.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sun, 2013-01-13 21:39

Looking forwarded to seeing your module contribution for the community.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
syscologne

Joined: 2003-05-20
Posts: 37
Posted: Tue, 2013-01-29 03:03

Intent was not to build a new module - It just helped me to modify the existing Piwik module to track the username of who is using my (family) album.