| 1 |
<?php |
| 2 |
// Exit if accessed directly |
| 3 |
if( ! defined( 'ABSPATH' ) ) exit; |
| 4 |
?> |
| 5 |
<div class="wpforo-profile-account"> |
| 6 |
|
| 7 |
<?php if( WPF()->current_object['user_is_same_current_user'] || ( WPF()->usergroup->can( 'em' ) && WPF()->perm->user_can_manage_user( WPF()->current_userid, WPF()->current_object['userid'] ) ) ) : |
| 8 |
$fields = wpforo_account_fields(); |
| 9 |
?> |
| 10 |
|
| 11 |
<form id="wpf-profile-account-form" action="" enctype="multipart/form-data" method="POST" autocomplete="off"> |
| 12 |
<input id="for-stupid-mozilla" type="password" style="display: none"> |
| 13 |
|
| 14 |
<?php wp_nonce_field( 'wpforo_verify_form', '_wpfnonce' ); ?> |
| 15 |
<input type="hidden" name="member[userid]" value="<?php echo esc_attr( WPF()->current_object['userid'] ) ?>"> |
| 16 |
<input type="hidden" name="member[username]" value="<?php echo esc_attr( wpfval( WPF()->current_object['user'], 'user_login' ) ) ?>"> |
| 17 |
<div class="wpf-table"> |
| 18 |
|
| 19 |
<?php wpforo_fields( $fields ); ?> |
| 20 |
|
| 21 |
<div class="wpf-tr"> |
| 22 |
<div class="wpf-td wpfw-1"> |
| 23 |
<div class="wpf-field wpf-field-type-submit"> |
| 24 |
<?php do_action( 'wpforo_profile_account_bottom' ); ?> |
| 25 |
<input type="submit" value="<?php wpforo_phrase( 'Save Changes' ) ?>"> |
| 26 |
</div> |
| 27 |
<div class="wpf-field-cl"></div> |
| 28 |
</div> |
| 29 |
<div class="wpf-cl"></div> |
| 30 |
</div> |
| 31 |
</div> |
| 32 |
</form> |
| 33 |
|
| 34 |
<?php else: ?> |
| 35 |
<?php if( isset( WPF()->current_object['user']['user_activation_key'] ) && WPF()->current_object['user']['user_activation_key'] ): ?> |
| 36 |
<p class="wpf-p-error"><?php wpforo_phrase( 'Success! Please check your mail for confirmation.' ) ?></p> |
| 37 |
<?php else: ?> |
| 38 |
<p class="wpf-p-error"><?php wpforo_phrase( 'Permission denied' ) ?></p> |
| 39 |
<?php endif; ?> |
| 40 |
<?php endif; ?> |
| 41 |
</div> |
| 42 |
|