I know we can use the user method of ion auth to get user data.
$user = $this->ion_auth->user()->row();
echo $user->ip_address;
But this gives an output u�8/ .How can I retrieve the actual ip address like 127.0.0.1.
UPDATE
Just to help others.
With help from h2ooooooo,I found that ipaddress is passed through bin2hex(inet_pton($ip))
and then saved in db. To retrieve it use
$user = $this->ion_auth->user()->row();
echo inet_ntop($user->ip_address);