https://github.com/olegkoval/php-user_info

bu class işini görür hocam, refi aldıktan sonra basit bi if else ile yönlendirme atabilirsin