D
D
dotrem2015-11-02 22:26:56
PHP
dotrem, 2015-11-02 22:26:56

How to prevent the user from leaving the profile?

I have wordpress+buddypress.
After the user registers, I redirect them to the buddypress profile edit page. And I want that he could not save his profile until he fills in some fields.
Check the fields for fullness is clear as:

<?php
$bpProfileField = bp_get_profile_field_data( 'field=fieldName&user_id=' .    $userid );
if ( empty ( $bpProfileField) ):
?>

And how to prevent the user from leaving this page?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
riot26, 2015-11-02
@riot26

Firstly, this is bad practice, and secondly, nothing.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question