- $cl_name = $user->name;
- $cl_login = $user->login;
- $cl_email = $user->email;
+ if ($user->behalf_id) {
+ $cl_name = $user_details['name'];
+ $cl_login = $user_details['login'];
+ $cl_email = $user_details['email'];
+ } else {
+ $cl_name = $user->name;
+ $cl_login = $user->login;
+ $cl_email = $user->email;
+ }