Drupal 8: How to check user logged in via mobile or app?

by Mike   Last Updated January 12, 2018 07:07 AM

On Drupal login page, can we check weather it's login via Mobile or Application?

On basis of it's logged in (web or mobile) I need to check things.

Tags : 8


Answers 1


There is a module for that, Browscap modlue from the module page

Browscap provides an improved version of PHP's get_browser() function. The get_browser() function can be used to tell what a visitor's browser is capable of. Unfortunately, the version provided by PHP has a number of limitations, namely: It can be difficult or impossible to configure for shared hosting environments. The data used to identify browsers and determine their capabilities requires consistent maintenance to keep up-to-date. Browscap automates maintenance by storing browser data in a database and automatically retrieving the latest data on a configurable schedule.

configuration is very easy, and you can use it with panels module to display or not a block content if is mobile or not. current D8 version is 8.x-3.0-alpha2

pinueve
pinueve
January 12, 2018 07:04 AM

Related Questions