Limit access and editing menu by user
There is a nice module to handle visibility of menu items. You can use the module or see code in side the module. 

May be It will help you. I am not sure :P

https://www.drupal.org/project/menu_item_visibility