1# See bottom of file for license and copyright information
2package Foswiki;
3
4use strict;
5use warnings;
6require Foswiki::Macros::USERINFO;
7
8BEGIN {
9    if ( $Foswiki::cfg{UseLocale} ) {
10        require locale;
11        import locale();
12    }
13}
14
15sub USERNAME {
16    my ( $this, $params ) = @_;
17
18    $params->{format} = $this->{prefs}->getPreference('USERNAME')
19      || '$username';
20
21    return $this->USERINFO($params);
22}
23
241;
25__END__
26Foswiki - The Free and Open Source Wiki, http://foswiki.org/
27
28Copyright (C) 2008-2017 Foswiki Contributors. Foswiki Contributors
29are listed in the AUTHORS file in the root of this distribution.
30NOTE: Please extend that file, not this notice.
31
32Additional copyrights apply to some or all of the code in this
33file as follows:
34
35Copyright (C) 1999-2007 Peter Thoeny, peter@thoeny.org
36and TWiki Contributors. All Rights Reserved. TWiki Contributors
37are listed in the AUTHORS file in the root of this distribution.
38Based on parts of Ward Cunninghams original Wiki and JosWiki.
39Copyright (C) 1998 Markus Peter - SPiN GmbH (warpi@spin.de)
40Some changes by Dave Harris (drh@bhresearch.co.uk) incorporated
41
42This program is free software; you can redistribute it and/or
43modify it under the terms of the GNU General Public License
44as published by the Free Software Foundation; either version 2
45of the License, or (at your option) any later version. For
46more details read LICENSE in the root of this distribution.
47
48This program is distributed in the hope that it will be useful,
49but WITHOUT ANY WARRANTY; without even the implied warranty of
50MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
51
52As per the GPL, removal of this notice is prohibited.
53