/**
 * Checks if otpKey and otep for the user are not empty
 * if any one is empty returns false, else returns true
 *
 * @return  boolean
 *
 * @since   4.0.0
 *
 * @throws \Exception
 */
private function hasUserConfiguredTwoFactorAuthentication() : bool
{
    $user = $this->getIdentity();
    if (empty($user->otpKey) || empty($user->otep)) {
        return false;
    }
    // Set session to user has configured 2fa
    $this->getSession()->set('has2fa', 1);
    return true;
}