function uc_wishlist_settings_form_validate in UC Wish List 6
Same name and namespace in other branches
- 7 uc_wishlist.pages.inc \uc_wishlist_settings_form_validate()
File
- ./
uc_wishlist.pages.inc, line 198 - Page callback and functions for wish lists.
Code
function uc_wishlist_settings_form_validate($form, &$form_state) {
global $user;
$wid = $form_state['values']['wid'];
$wishlist = uc_wishlist_load($wid);
if (!$wishlist) {
drupal_set_message(t('Could not find the specified wish list.'), 'error');
return FALSE;
}
if ($wishlist->uid != $user->uid && !user_perm('administer store')) {
drupal_set_message(t('You do not have permission to edit this wish list.'), 'error');
return FALSE;
}
}