Commit ac315410 authored by Benjamin Melançon's avatar Benjamin Melançon Committed by Christopher C. Wells
Browse files

Issue #3267061 by MegaKeegMan, mlncn: Allow Social Post modules to save additional data

parent 5913e0e1
Loading
Loading
Loading
Loading
+4 −1
Changes for src/User/UserManager.php: 4 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -61,11 +61,13 @@ public function __construct(EntityTypeManagerInterface $entity_type_manager,
   *   The URL to the profile in the provider.
   * @param string $token
   *   Token to be used for autoposting.
   * @param string $additional_data
   *   A serialized array of extra information.
   *
   * @return bool
   *   True if User record was created or False otherwise
   */
  public function addUserRecord($name, $user_id, $provider_user_id, $url, $token) {
  public function addUserRecord($name, $user_id, $provider_user_id, $url, $token, $additional_data = '') {

    if ($this->getDrupalUserId($provider_user_id)) {
      return FALSE;
@@ -77,6 +79,7 @@ public function addUserRecord($name, $user_id, $provider_user_id, $url, $token)
      'provider_user_id' => $provider_user_id,
      'name' => $name,
      'token' => $token,
      'additional_data' => $additional_data,
    ];

    // If URL to profile is provided.