Fix user regsiter form & user roles
This commit is contained in:
4
templates/user/error.php
Normal file
4
templates/user/error.php
Normal file
@@ -0,0 +1,4 @@
|
||||
<div class="opalestate-user-dashboard-error">
|
||||
<h4><?php esc_html_e( 'You need a higher level of permission or this page is denied with your user role.', 'opalestate-pro' ) ?></h4>
|
||||
<p><?php esc_html_e( 'Sorry, you are not allowed to this page.', 'opalestate-pro' ); ?></p>
|
||||
</div>
|
||||
@@ -25,6 +25,7 @@ if ( is_user_logged_in() ) {
|
||||
}
|
||||
|
||||
$types = OpalEstate_User::get_user_types();
|
||||
$type_default = apply_filters( 'opalestate_register_form_default_type', 'subscriber' );
|
||||
?>
|
||||
<div class="opalesate-form">
|
||||
<?php if ( $hide_title === false ) : ?>
|
||||
@@ -69,7 +70,7 @@ $types = OpalEstate_User::get_user_types();
|
||||
<label for="userrole"><?php esc_html_e( 'Type', 'opalestate-pro' ); ?> <span class="required">*</span></label>
|
||||
<select name="role" id="userrole" class="form-control">
|
||||
<?php foreach ( $types as $type => $label ): ?>
|
||||
<option value="<?php echo $type; ?>"><?php echo $label; ?></option>
|
||||
<option value="<?php echo $type; ?>" <?php selected( $type, $type_default, true ); ?>><?php echo $label; ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</p>
|
||||
|
||||
Reference in New Issue
Block a user