0

I am working on a custom signup proces, where user first sign up with their name and email and after that they gonna add their company (a post in post type 'companies').

After they have signed up with their name and e-mail the receive an e-mail with a registration link. I need to save their data temporary, so if they click the link, their name and e-mail be retrieved back from the database.

What is the best option to save this data a Wordpress way. Use option table?

I cannot save it in Session because some people read their e-mail a week later for example.

1

You could save this as user_meta using [add_user_meta][1]. The options are usually used for sitewide settings, whereas the user_meta is specific for the single user.

add_user_meta( $user_id, $meta_key, $meta_value, $unique );

You can either delete the data on activation of the account, or leave it there - I do not see why you would want to delete it.

So the process should be

  • create user
  • add user meta
  • send registration email
  • your custom activation stuff

Everything okay so far?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.