Title: Ultimate Member hook
Last modified: January 10, 2018

---

# Ultimate Member hook

 *  [jkepler](https://wordpress.org/support/users/jkepler/)
 * (@jkepler)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/ultimate-member-hook/)
 * Greetings
 * Can someone please tell me where exactly do I place a hook code for custom validation
   in a registration form made with Ultimate Member?
 * Supose I have a custom field FIELD_1, and on submission I want to run Function_1.
   The code will be:
 * add_action(‘um_submit_form_errors_hook_’,’Function_1′);
    function Function1( 
   $args ) { global $ultimatemember; //check var $args[‘F1’] //… }
 * Where exactly do I place this code? Inside the registration page as PHP?
 * Another question, if I may: can I override the wp-signup.php with Ultimate Member
   or must it be done via .htaccess?
 * Kind regards
 * Kepler

Viewing 8 replies - 1 through 8 (of 8 total)

 *  Plugin Support [mansurahamed](https://wordpress.org/support/users/mansurahamed/)
 * (@mansurahamed)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/ultimate-member-hook/#post-9850093)
 * Hi [@jkepler](https://wordpress.org/support/users/jkepler/),
 * You custom hook codes should be placed in your child theme’s functions.php file.
   UM overrides wordpress signup. you should see the default signup form & allow
   you to register using um registration form in [http://yousite.com/register](http://yousite.com/register)
   page.
 * Thank you.
 *  Thread Starter [jkepler](https://wordpress.org/support/users/jkepler/)
 * (@jkepler)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/ultimate-member-hook/#post-9850362)
 * Hi [@mansurahamed](https://wordpress.org/support/users/mansurahamed/)
 * Thanks for the reply. One question if I may: if I use “My Custom Functions” plugin,
   and add my code there, will it work right?
 * Kind regards
 * JKepler
 *  Plugin Support [Ultimate Member Support](https://wordpress.org/support/users/ultimatemembersupport/)
 * (@ultimatemembersupport)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/ultimate-member-hook/#post-9851182)
 * Hi [@jkepler](https://wordpress.org/support/users/jkepler/),
 * Yes, it should work.
 * Regards.
 *  Thread Starter [jkepler](https://wordpress.org/support/users/jkepler/)
 * (@jkepler)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/ultimate-member-hook/#post-9851216)
 * Hi
 * It doesn’t…I’m doing something wrong… Can you help me please with an example?
 * NOTE: If I place the code in function.php of the child template it works. With
   a code snippet plugin it doesn’t. So I must be placing the wrong code/hook
 * Kind regards
 * JKepler
    -  This reply was modified 8 years, 4 months ago by [jkepler](https://wordpress.org/support/users/jkepler/).
 *  Plugin Support [Ultimate Member Support](https://wordpress.org/support/users/ultimatemembersupport/)
 * (@ultimatemembersupport)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/ultimate-member-hook/#post-9851250)
 * Hi [@jkepler](https://wordpress.org/support/users/jkepler/),
 * Have you selected “Custom validation” in Validate dropdown in your field settings?
   
   Please also make sure to add your action name in Custom Action field.
 * Regards.
 *  Thread Starter [jkepler](https://wordpress.org/support/users/jkepler/)
 * (@jkepler)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/ultimate-member-hook/#post-9851365)
 * Hi,
 * Yes I did. The proof is that if I place my validating code in the functions.php
   child theme, the validation is done correctly (it only allows what I want, otherwise
   gives a custom error message defined by me).
 * So with codes snippets the code is not being injected – whatever value I place
   in the custom field is accepted.
 * Kind regards
 * JKepler
 *  [ilincazh](https://wordpress.org/support/users/ilincazh/)
 * (@ilincazh)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/ultimate-member-hook/#post-10337600)
 * I’m having the same problem. Is this a bug in Ultimate Member?
 * [@jkepler](https://wordpress.org/support/users/jkepler/) were you able to solve
   your issue?
 *  [Izaac Johansson](https://wordpress.org/support/users/izaacj/)
 * (@izaacj)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/ultimate-member-hook/#post-10498582)
 * Trying to add validation in my plugin, but it doesn’t work.
 * I have a field for a verification code, that shall be verified against another
   server (api stuff) and it seems that the validation doesn’t run at all. tried
   die’ing inside my validate function to no avail.
 * the code should be like this, right:
 * add_action( ‘um_submit_form_errors_hook_’, ‘my_validation’ )
    function my_validation(
   $args) { // code }
 * And what shall I put in the form editors custom validation field? All docs on
   this is EXTREMELY vague.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Ultimate Member hook’ is closed to new replies.

 * ![](https://ps.w.org/ultimate-member/assets/icon-256x256.png?rev=3160947)
 * [Ultimate Member – User Profile, Registration, Login, Member Directory, Content Restriction & Membership Plugin](https://wordpress.org/plugins/ultimate-member/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ultimate-member/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ultimate-member/)
 * [Active Topics](https://wordpress.org/support/plugin/ultimate-member/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ultimate-member/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ultimate-member/reviews/)

## Tags

 * [custom](https://wordpress.org/support/topic-tag/custom/)
 * [php](https://wordpress.org/support/topic-tag/php/)
 * [Registration](https://wordpress.org/support/topic-tag/registration/)
 * [ultimate-member plugin](https://wordpress.org/support/topic-tag/ultimate-member-plugin/)

 * 8 replies
 * 5 participants
 * Last reply from: [Izaac Johansson](https://wordpress.org/support/users/izaacj/)
 * Last activity: [7 years, 10 months ago](https://wordpress.org/support/topic/ultimate-member-hook/#post-10498582)
 * Status: not resolved