Current User In Custom Menu Item URL [closed]

Congrats on figuring it out.
Perhaps this would also work:

function change_menu($items){
  foreach($items as $item){

   if ($item-> post_name == 'the-slug')/*replace "the-slug" with menu item post_name */
        $item->url = bp_loggedin_user_domain() . '/events/my-events/?action=edit';

  }
  return $items;

}
add_filter('wp_nav_menu_objects', 'change_menu');

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)