check if user is connected via mobile app

check if user is connected via mobile app

by Pantelis Toptsis -
Number of replies: 1
Hi,
I want to create custom functions in php files but I don't want them to execute if user is connected using Mobile App.
Is there a way to check it in an "if" command?


Average of ratings: -
In reply to Pantelis Toptsis

Re: check if user is connected via mobile app

by Juan Leyva -
Picture of Core developers Picture of Moodle HQ Picture of Plugin developers Picture of Testers

Hi,

if (WS_SERVER) <-- this means you are accessing via the Mobile app or any web service client