Osclass Support Forums

Osclass plugin support => Free Osclass Plugins => Facebook Login Plugin => Topic started by: Flavius Scripcari on April 14, 2019, 12:51:19 AM

Title: Data login incorect
Post by: Flavius Scripcari on April 14, 2019, 12:51:19 AM
Hi,
When logging in with the facebook plug-in, in the admin menu at the login / account creation date 01/01/1970 02:00 is not the date on which your account was created on the website.

Can you help me with solving the problem, an idea that would be the problem?

Below you have the function code.

if($user_regular && isset($user_regular['pk_i_id']) && $user_regular['pk_i_id'] > 0) {
      // user is already registered
      $user_id = $user_regular['pk_i_id'];

    } else {
      // user is not registered
      $pass = osc_genRandomPassword();
      $value_user = array(
        's_name' => $user_data['s_fb_user_name'],
        's_email' => $user_data['s_fb_user_email'],
        's_secret' => osc_genRandomPassword(),
        's_password' => osc_hash_password($pass),
        'b_enabled' => 1,
        'b_active' => 1,
        'dt_reg_date' => date("Y-m-d H:i:s")
      );
Title: Re: Data login incorect
Post by: MB Themes on April 24, 2019, 07:17:29 AM
Change
Code: [Select]
        'dt_reg_date' => date("Y-m-d H:i:s")
into
Code: [Select]
        'dt_access_date' => date("Y-m-d H:i:s"),
        'dt_mod_date' => date("Y-m-d H:i:s"),
        'dt_reg_date' => date("Y-m-d H:i:s")