1212use Adldap \Laravel \Events \DiscoveredWithCredentials ;
1313use Adldap \Laravel \Events \AuthenticatedWithCredentials ;
1414use Illuminate \Support \Facades \Bus ;
15- use Illuminate \Support \Facades \Event ;
1615use Illuminate \Support \Facades \Config ;
1716use Illuminate \Auth \EloquentUserProvider ;
1817use Illuminate \Contracts \Hashing \Hasher ;
@@ -104,7 +103,7 @@ public function retrieveByCredentials(array $credentials)
104103 // Set the currently authenticating LDAP user.
105104 $ this ->user = $ user ;
106105
107- Event:: fire (new DiscoveredWithCredentials ($ user ));
106+ event (new DiscoveredWithCredentials ($ user ));
108107
109108 // Import / locate the local user account.
110109 return Bus::dispatch (
@@ -126,7 +125,7 @@ public function validateCredentials(Authenticatable $model, array $credentials)
126125 // If an LDAP user was discovered, we can go
127126 // ahead and try to authenticate them.
128127 if (Resolver::authenticate ($ this ->user , $ credentials )) {
129- Event:: fire (new AuthenticatedWithCredentials ($ this ->user , $ model ));
128+ event (new AuthenticatedWithCredentials ($ this ->user , $ model ));
130129
131130 // Here we will perform authorization on the LDAP user. If all
132131 // validation rules pass, we will allow the authentication
@@ -142,15 +141,15 @@ public function validateCredentials(Authenticatable $model, array $credentials)
142141 if ($ model ->wasRecentlyCreated ) {
143142 // If the model was recently created, they
144143 // have been imported successfully.
145- Event:: fire (new Imported ($ this ->user , $ model ));
144+ event (new Imported ($ this ->user , $ model ));
146145 }
147146
148- Event:: fire (new AuthenticationSuccessful ($ this ->user , $ model ));
147+ event (new AuthenticationSuccessful ($ this ->user , $ model ));
149148
150149 return true ;
151150 }
152151
153- Event:: fire (new AuthenticationRejected ($ this ->user , $ model ));
152+ event (new AuthenticationRejected ($ this ->user , $ model ));
154153 }
155154
156155 // LDAP Authentication failed.
0 commit comments