Award user points for selecting an avatar? I'd like to award my happy little users when they select an avatar.

Anyone know of a module that melds User Points and Avatar Selection?

Both modules are awesome, but I can't find a way to combine them into thanks-for-making-your-profile-pretty goodness.
I don't think there already exists a module for this.

What you need to do is implement hook_user_update() and check if the user now has a picture assigned but didn't before. If so, use userpoints_userpointsapi() to grant the user the number of points you want.

Something like this:

&lt;?php
function yourmodule_user_update(&amp;$edit, $account, $category) {
  if (!empty($edit['picture'] &amp;&amp; empty($account-&gt;picture)) {
    $params = array(
      'uid' =&gt; $account-&gt;uid,
      'points' =&gt; 10,
      // You probably want to provide additional arguments, 
      // refer to the API documentation.
    );
    userpoints_userpointsapi($params);
  }
}
?&gt;