Hi,
Glad that works for you :)
I don't see why not. It would just require you to add a function to the Auth_Community.pm file (in GLinks), something like:
my $cfg = Links::Plugins->get_plugin_user_cfg('Auth_Community');
my $NEWDB = new GT::SQL (
def_path => "$cfg->{community_private}/defs",
cache => 0,
debug => 0,
subclass => 1
);
require GT::SQL::Condition;
my $db = $NEWDB->table('comm_users');
my $num_logins = $db->select( { comm_username => $_[0] } )->fetchrow_hashref || die $GT::SQL::error;
return $num_logins;
}
..then call with:
<%Plugins::Auth_Community::get_users_login_count($Username)%>
This is *totally* untested, as I'm a bit busy at the moment, but hopefully it will work :)
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Glad that works for you :)
Quote:
What about this code. Is there something I could change to get the 'number of logins' output from community?I don't see why not. It would just require you to add a function to the Auth_Community.pm file (in GLinks), something like:
Code:
sub get_users_login_count { my $cfg = Links::Plugins->get_plugin_user_cfg('Auth_Community');
my $NEWDB = new GT::SQL (
def_path => "$cfg->{community_private}/defs",
cache => 0,
debug => 0,
subclass => 1
);
require GT::SQL::Condition;
my $db = $NEWDB->table('comm_users');
my $num_logins = $db->select( { comm_username => $_[0] } )->fetchrow_hashref || die $GT::SQL::error;
return $num_logins;
}
..then call with:
<%Plugins::Auth_Community::get_users_login_count($Username)%>
This is *totally* untested, as I'm a bit busy at the moment, but hopefully it will work :)
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!