util: use native PHP user agent
Signed-off-by: Varun Patil <radialapps@gmail.com>pull/672/head
parent
f154e12804
commit
1a6f17fb54
|
@ -412,9 +412,8 @@ class Util
|
||||||
*/
|
*/
|
||||||
public static function callerIsNative(): bool
|
public static function callerIsNative(): bool
|
||||||
{
|
{
|
||||||
$userAgent = \OC::$server->get(\OCP\IRequest::class)->getHeader('User-Agent');
|
// Should not use IRequest here since this method is called during registration
|
||||||
|
return false !== strpos($_SERVER['HTTP_USER_AGENT'] ?? '', 'MemoriesNative');
|
||||||
return false !== strpos($userAgent, 'MemoriesNative');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue