You are here

function avatar_selection_upload_form_validate in Avatar Selection 5.2

Validate and upload the image.

Parameters

$form_id: The form id.

$form_values: Array containing the form values submitted.

File

./avatar_selection.module, line 925
The Avatar Selection module allows the user to pick an avatar image from a list already loaded by an administrative user, and to the administrator to disable uploading other avatar files by the user.

Code

function avatar_selection_upload_form_validate($form_id, $form_values) {
  $error = FALSE;
  if ($form_values['op'] == t('Upload')) {
    if ($file = file_check_upload('picture_upload')) {
      avatar_selection_validate_picture($file);
    }
  }
}