networking – How can a mobile operator’s web server seamlessly identify a user during HTTPS traffic?

For un-encrypted HTTP traffic, a networking component between the mobile handset and final web server adds the user’s MSISDN into a HTTP header. But how does it work with HTTPS?

I do believe it is feasible because I’ve seen a sequence diagram which suggests the MNO is capable of knowing who is being redirected to its OAUTH server without user interaction, but how? I’m curious to understand how it’s done.

Thanks!

php – Don’t update modified post date when user add a product review or comment?

I am using WooCommerce and I added the following code on content-single-product.phptemplate to show last update of product:

<p class="data-label">Updated</p>
<p class="info"> <?php echo get_the_modified_time( 'F j, Y' ); ?> </p>

On single product pages I have enable reviews tab and comment tab so customer can add comment on a product.

The problem is when user add new review or comment to product, the last update date for the

product is changed to the date of its comment.

I don’t want to change the last update date of product when user add new comment on any product.

django – How to do logging separated for each user in order to serve them back?

I am developing a platform (Django app) which will be used by software companies. I’m planning to create an interface to show application logs of users separately for the platform as a real time service in order them to utilize that logs. I have a few questions in order to find the optimum solution:

  • How can I configure logs to keep them separately?
  • Can I handle it by using external tools like Sentry?
  • And how can i serve the logs back on my platform if I use an external tools?

I am also open for logging tool options for that purpose.

When does a custom User Property persist as a dimension for a User in Google Analytics?

We have setup a custom user property for our GA users, and are tracking that property with our GA events through GoogleTagManager.

I can confirm that user events are now coming through with the user property defined. This user property will also be static for each user. So some User1 will always have their custom property value as “xyz”, which will always be reported with each Google Analytics event.

I now want to be able to explore user data by using that custom user property as a dimension. Now this is sort of working, I can see some percentage of users who are listed as “xyz” or “xyz2”, etc… But most of our users are still listed as (not set) for that user property, even though if I explore their user activity I can see that their events are coming through with the custom user property set as “xyz”.

So my question is how does a dimension for a custom user property determine a users value for that particular custom property? Do I have to wait for a majority of a user’s events to have “xyz” for the custom property value before that user is moved to the “xyz” value of the dimension?

centos – You must change the ownership of ORACLE_BASE directory to “oracle” user

I am trying to install Oracle 18c XE on CentOS dedibox but this message is displayed

(SEVERE) The install cannot proceed because ORACLE_BASE directory (/opt/oracle)
is not owned by "oracle" user. You must change the ownership of ORACLE_BASE
directory to "oracle" user and retry the installation.

Please advise

Best Regards

8 – User field to entity reference

I have created a content type, with a custom field.

Then i have created an Entity Rereference on the users fields, so the user can select from those nodes on their user account settings.

The idea is to allow the user select values from a content type, this is working, but i need to show this field with the selected values on a custom module with php.

I got already the user object but not able to get the nodes selected from the entity:

$id is the current user id, this is ok!

$user = User::load($uid);

Trying to getting the values:

$selectedBrands = ();
foreach ($user->field_brands as $item) {
  if ($item->entity) {
    $selectedBrands($item->entity->id()) = $item->entity->label();
  }
}

Im just getting this:

Array()

But the user has 2 selected brands here.

8 – PHPUnit fails when logging in user

I’ve got a custom module and have the auto generated LoadTest but it is not working. This is a functional test.

  protected function setUp() {
    parent::setUp();
    $this->user = $this->drupalCreateUser(('administer site configuration'));
    $this->drupalLogin($this->user); // Breaks here
  }

  public function testLoad() {
    $this->drupalGet(Url::fromRoute('<front>'));
    $this->assertSession()->statusCodeEquals(200);
  }

Running this test returns :

1) DrupalTestsweekly_digestFunctionalLoadTest::testLoad
User <em class="placeholder">belwfS3e</em> successfully logged in.
Failed asserting that false is true.

/app/web/core/tests/Drupal/TestTools/PhpUnitCompatibility/PhpUnit7/TestCompatibilityTrait.php:18
/app/web/core/tests/Drupal/Tests/UiHelperTrait.php:254
/app/web/modules/custom/weekly_digest/tests/src/Functional/LoadTest.php:35

When I comment out the drupalLogin call the test succeeds.

The fail is on this line

$this->assertTrue($this->drupalUserIsLoggedIn($account), new FormattableMarkup('User %name successfully logged in.', ('%name' => $account->getAccountName())));

And if you look at the error from above it’s from the TestCompatibilityTrait which had some pretty wacky deprecation errors.

Here is my phpunit env

    <!-- Set error reporting to E_ALL. -->
    <ini name="error_reporting" value="32767"/>
    <!-- Do not limit the amount of memory tests take to run. -->
    <ini name="memory_limit" value="-1"/>

    <env name="SYMFONY_DEPRECATIONS_HELPER" value="disabled"/>

    <env name="SIMPLETEST_BASE_URL" value="http://changelog.lndo.site/"/>
    <env name="SIMPLETEST_DB" value="mysql://drupal8:drupal8@database/drupal8"/>

    <env name="BROWSERTEST_OUTPUT_DIRECTORY" value="web/sites/simpletest/browser_output"/>
    <env name="BROWSERTEST_OUTPUT_BASE_URL" value=""/>

    <!-- Example for changing the driver class for mink tests MINK_DRIVER_CLASS value: 'DrupalFunctionalJavascriptTestsDrupalSelenium2Driver' -->
    <env name="MINK_DRIVER_CLASS" value=''/>
    <!-- Example for changing the driver args to mink tests MINK_DRIVER_ARGS value: '("http://127.0.0.1:8510")' -->
    <env name="MINK_DRIVER_ARGS" value=''/>
    <!-- Example for changing the driver args to phantomjs tests MINK_DRIVER_ARGS_PHANTOMJS value: '("http://127.0.0.1:8510")' -->
    <env name="MINK_DRIVER_ARGS_PHANTOMJS" value=''/>
    <!-- Example for changing the driver args to webdriver tests MINK_DRIVER_ARGS_WEBDRIVER value: '("chrome", { "chromeOptions": { "w3c": false } }, "http://localhost:4444/wd/hub")' For using the Firefox browser, replace "chrome" with "firefox" -->
    <env name="MINK_DRIVER_ARGS_WEBDRIVER" value=''/>

This is using lando.
Why would I be getting these failures? It accesses the site just fine, it seems to be checking if the user is logged in that’s causing the issue but I can’t find out why.