Skip to content

Commit 19473e5

Browse files
author
ziming
committed
cast to string before calling method
1 parent 1fdb548 commit 19473e5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/Utils/LaravelUserToStatsigUserConverter.php

+5-2
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,17 @@ class LaravelUserToStatsigUserConverter
1616

1717
public static function defaultConvert(User $laravelUser): StatsigUser
1818
{
19-
$statsigUser = StatsigUser::withUserID($laravelUser->getAuthIdentifier());
19+
$statsigUser = StatsigUser::withUserID(
20+
(string) $laravelUser->getAuthIdentifier()
21+
);
22+
2023
$statsigUser->setEmail($laravelUser->getEmailForVerification());
2124
$statsigUser->setStatsigEnvironment([App::environment()]);
2225
$statsigUser->setIP(request()->ip());
2326

2427
// What are the difference between current locale and get locale?
2528
// $statsigUser->setLocale(App::currentLocale());
26-
$statsigUser->setLocale(App::getLocale());
29+
$statsigUser->setLocale(App::currentLocale());
2730

2831
// are these set automatically? can i remove?
2932
$statsigUser->setUserAgent(request()->userAgent());

0 commit comments

Comments
 (0)