@@ 40-72 (lines=33) @@ | ||
37 | * |
|
38 | * @return Builder |
|
39 | */ |
|
40 | public static function confirmationEvent( |
|
41 | $sequenceId, |
|
42 | $userId, |
|
43 | $timestamp = null, |
|
44 | $isEmailConfirmed = null, |
|
45 | $idPhoneConfirmed = null, |
|
46 | $email = null, |
|
47 | $phone = null |
|
48 | ) { |
|
49 | $builder = new self('confirmation', $sequenceId); |
|
50 | if ($timestamp === null) { |
|
51 | $timestamp = time(); |
|
52 | } |
|
53 | ||
54 | return $builder->addUserData( |
|
55 | $email, |
|
56 | $userId, |
|
57 | $phone, |
|
58 | null, |
|
59 | null, |
|
60 | null, |
|
61 | null, |
|
62 | null, |
|
63 | null, |
|
64 | null, |
|
65 | null, |
|
66 | null, |
|
67 | $timestamp, |
|
68 | $isEmailConfirmed, |
|
69 | $idPhoneConfirmed, |
|
70 | null |
|
71 | ); |
|
72 | } |
|
73 | ||
74 | /** |
|
75 | * Returns builder for login event |
|
@@ 85-115 (lines=31) @@ | ||
82 | * |
|
83 | * @return Builder |
|
84 | */ |
|
85 | public static function loginEvent( |
|
86 | $sequenceId, |
|
87 | $userId, |
|
88 | $timestamp = null, |
|
89 | $email = null, |
|
90 | $failed = null |
|
91 | ) { |
|
92 | $builder = new self('login', $sequenceId); |
|
93 | if ($timestamp === null) { |
|
94 | $timestamp = time(); |
|
95 | } |
|
96 | ||
97 | return $builder->addUserData( |
|
98 | $email, |
|
99 | $userId, |
|
100 | null, |
|
101 | null, |
|
102 | null, |
|
103 | null, |
|
104 | null, |
|
105 | null, |
|
106 | null, |
|
107 | null, |
|
108 | null, |
|
109 | $timestamp, |
|
110 | null, |
|
111 | null, |
|
112 | null, |
|
113 | $failed |
|
114 | ); |
|
115 | } |
|
116 | ||
117 | /** |
|
118 | * Returns builder for registration event |