// If we deleted the "on behalf" user reset its info in session.
if ($user_id == $user->behalf_id) {
unset($_SESSION['behalf_id']);
// If we deleted the "on behalf" user reset its info in session.
if ($user_id == $user->behalf_id) {
unset($_SESSION['behalf_id']);