Update functions.php

$user->email return empty value it should be $user[0]->email