Jesica Arroyo Salvador
Jesica Arroyo Salvador

Reputation: 143

How to check with Rules if users have a custom picture

I have a rule with this Events: -After saving a new user account -After updating an existing user account

In conditions, I try to put "Data value is empty" -> account: (I don't found "picture", "image" or any of this)

I have: admin/config/people/accounts user images [check]

1.- Any idea how I can check if the user has used a custom image?

2.- Another question, is better add these events or "before saving a user account"?

Thanks ^^

Upvotes: 1

Views: 175

Answers (1)

Paul Bönisch
Paul Bönisch

Reputation: 294

Check image with custom PHP code $user = user_load($account->uid); $filename = $user->picture->filename;

Upvotes: 0

Related Questions