Difference between revisions of "Freeside:4:Documentation:Developer/bin/freeside-sqlradius-seconds"
(Edit via perl MediaWiki framework (1.13))
Latest revision as of 08:46, 18 November 2015
freeside-sqlradius-seconds - Command line time-online tool
freeside-sqlradius-seconds freeside_username target_username start_date [ stop_date ]
Returns the number of seconds the specified username has been online between start_date (inclusive) and stop_date (exclusive). See "seconds since sqlradacct" in FS/svc acct|FS::svc_acct#seconds_since_sqlradacct|"seconds_since_sqlradacct" in FS::svc_acct
freeside_username is a username added by freeside-adduser. target_username is the username of the user account to query. start_date and stop_date are in any format Date::Parse is happy with. stop_date defaults to now if not specified.
Selection of the account in question is rather simplistic in that target_username doesn't necessarily identify a unique account (and wouldn't even if a domain was specified), and no sqlradius export is checked for.