99 * @author Arman Ag. <arman.ag@softberg.org>
1010 * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org)
1111 * @link http://quantum.softberg.org/
12- * @since 2.9.7
12+ * @since 2.9.9
1313 */
1414
1515namespace Quantum \Libraries \Auth \Traits ;
@@ -249,7 +249,7 @@ protected function twoStepVerification(User $user): string
249249
250250 $ time = new DateTime ();
251251
252- $ time ->add (new DateInterval ('PT ' . config ()->get ('otp_expires ' ) . 'M ' ));
252+ $ time ->add (new DateInterval ('PT ' . config ()->get ('auth. otp_expires ' ) . 'M ' ));
253253
254254 $ this ->authService ->update (
255255 $ this ->keyFields [AuthKeys::USERNAME ],
@@ -344,7 +344,7 @@ protected function isActivated(User $user): bool
344344 */
345345 protected function generateToken (string $ val = null ): string
346346 {
347- return base64_encode ($ this ->hasher ->hash ($ val ?: config ()->get ('app_key ' )));
347+ return base64_encode ($ this ->hasher ->hash ($ val ?: config ()->get ('app.key ' )));
348348 }
349349
350350 /**
@@ -356,8 +356,8 @@ protected function sendMail(User $user, array $body)
356356 {
357357 $ fullName = ($ user ->hasField ('firstname ' ) && $ user ->hasField ('lastname ' )) ? $ user ->getFieldValue ('firstname ' ) . ' ' . $ user ->getFieldValue ('lastname ' ) : '' ;
358358
359- $ appEmail = config ()->get ('app_email ' ) ?: '' ;
360- $ appName = config ()->get ('app_name ' ) ?: '' ;
359+ $ appEmail = config ()->get ('app.email ' ) ?: '' ;
360+ $ appName = config ()->get ('app.name ' ) ?: '' ;
361361
362362 $ this ->mailer ->setFrom ($ appEmail , $ appName )
363363 ->setAddress ($ user ->getFieldValue ($ this ->keyFields [AuthKeys::USERNAME ]), $ fullName )
@@ -394,6 +394,6 @@ protected function verifySchema(array $schema)
394394 */
395395 protected function isTwoFactorEnabled (): bool
396396 {
397- return filter_var (config ()->get ('TWO_FA ' ), FILTER_VALIDATE_BOOLEAN );
397+ return filter_var (config ()->get ('auth.two_fa ' ), FILTER_VALIDATE_BOOLEAN );
398398 }
399399}
0 commit comments