[dokuwiki] Re: greet + question: MySQL auth, display name vs. loginname
- From: "Bob McConnell" <rvm@xxxxxxxxx>
- To: <dokuwiki@xxxxxxxxxxxxx>
- Date: Wed, 30 Jan 2008 08:54:20 -0500
-----Original Message-----
> From: dokuwiki-bounce@xxxxxxxxxxxxx
[mailto:dokuwiki-bounce@xxxxxxxxxxxxx] On > Behalf Of bepe
> Sent: Wednesday, January 30, 2008 8:42 AM
> To: dokuwiki@xxxxxxxxxxxxx
> Subject: [dokuwiki] greet + question: MySQL auth, display name vs.
loginname
>
> Hello,
>
> I'm new to this list so hello everyone!
>
> I've managed to authenticate from an existing mysql user db, but in
the
> 'last modified by' section and in the article change history the
> system displays the loginname, not the real/displayname i queried
from
>
> $conf['auth']['mysql']['getUserInfo'] = "SELECT c.realname as
> name, u.u_email AS mail FROM sys_user u, realnames c WHERE
> u_name='%{user}' AND u.u_id=c.u_id";
>
> how can i display the realnames and not the loginnames?
>
> Thx in advance.
>
> BePe
> --
I made this change a while ago, as follows:
The "last modified" line is printed by the function tpl_pageinfo() in
inc/template.php. In order to change that, I created a custom template
set and duplicated that function as mytpl_pageinfo() in main.php. Then I
changed mytpl_pageinfo() to show the full name. So this:
if($INFO['editor']){
print ' '.$lang['by'].' ';
print $INFO['editor'];
}
became:
global $auth;
$userinfo = $auth->getUserData($INFO['editor']);
if($userinfo['name']){
print ' '.$lang['by'].' ';
print $userinfo['name'];
}
Then in the footer section of main.php, replace the call to
tpl_pageinfo() with mytpl_pageinfo().
Bob McConnell
Principal Communications Programmer
The CBORD Group, Inc.
61 Brown Road
Ithaca NY, 14850
Phone 607 257-2410
FAX 607 257-1902
Email rvm@xxxxxxxxx
Web www.cbord.com
--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist
Other related posts: