/**
* Updates the current user's email address.
*
* @param string $email
* The new email address.
*
* @return bool
* TRUE if successful, FALSE otherwise.
*/
public function updateEmail($email)
{
// Make sure we're logged in and have a valid access token.
if (!$this->auth_token || !$this->username) {
return FALSE;
}
$timestamp = parent::timestamp();
$result = parent::post('/settings', array('action' => 'updateEmail', 'email' => $email, 'timestamp' => $timestamp, 'username' => $this->username), array($this->auth_token, $timestamp));
return isset($result->param) && $result->param == $email;
}