File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
src/Infrastructure/BotSharp.Core/Users/Services Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -96,6 +96,7 @@ record = db.GetUserByUserName(id);
96
96
}
97
97
98
98
User ? user = record ;
99
+ var isAuthenticatedByHook = false ;
99
100
var hooks = _services . GetServices < IAuthenticationHook > ( ) ;
100
101
if ( record == null || record . Source != "internal" )
101
102
{
@@ -129,6 +130,8 @@ record = db.GetUserByUserName(id);
129
130
} ;
130
131
await CreateUser ( record ) ;
131
132
}
133
+
134
+ isAuthenticatedByHook = true ;
132
135
break ;
133
136
}
134
137
}
@@ -138,13 +141,13 @@ record = db.GetUserByUserName(id);
138
141
return default ;
139
142
}
140
143
141
- if ( _setting . NewUserVerification && ! record . Verified )
144
+ if ( ! isAuthenticatedByHook && _setting . NewUserVerification && ! record . Verified )
142
145
{
143
146
return default ;
144
147
}
145
148
146
149
#if ! DEBUG
147
- if ( Utilities . HashText ( password , record . Salt ) != record . Password )
150
+ if ( ! isAuthenticatedByHook && Utilities . HashText ( password , record . Salt ) != record . Password )
148
151
{
149
152
return default ;
150
153
}
You can’t perform that action at this time.
0 commit comments