Description

This function returns the IP address of the user who most recently logged in.


Examples 




https://hostname.example.com:2083/cpsess##########/execute/LastLogin/get_last_or_current_logged_in_ip



$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
 
// What is the IP address of the most recently logged-in user?
$lionel_twain = $cpanel->uapi(
    'LastLogin', 'get_last_or_current_logged_in_ip'
);



my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
 
#  What is the IP address of the most recently logged-in user?
my $lionel_twain = $cpliveapi->uapi(
    'LastLogin', 'get_last_or_current_logged_in_ip',
);



<!--  What is the IP address of the most recently logged-in user? -->
[% data = execute( 'Backup', 'get_last_or_current_logged_in_ip' ); %]
[% FOREACH q = data %]
     <p>
         [% q %]
     </p>
[% END %]



uapi --user=username LastLogin get_last_or_current_logged_in_ip



{
  "messages": null,
  "errors": null,
  "status": 1,
  "metadata": {
  },
  "data": [
    "192.168.0.1"
  ]
}



Parameters

This function does not accept parameters.

Returns

ReturnTypeDescriptionPossible valuesExample
dataarrayThe IP address of the user who most recently logged in.A list of valid IP addresses.
192.168.0.1