Skip to content

Edit user programmatically #1

@abelleflamme

Description

@abelleflamme

Hello,

I'm trying to update users with the IP address because I have a lot of users to update.
I tried several type IP (normal, hexa, integer, ...) withouth any success.
$acc = \Drupal\user\Entity\User::load($shop_uid); $acc->set("field_ipaddress",$ip); $res = $acc->save();

Wath do I have to do here?

Thanks in advance,
Regards,
Adrien.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions