Remove user id from redirect URL on registration process

This commit is contained in:
Champ Camba
2016-11-28 23:14:26 +08:00
parent ec23be0b00
commit 69007f55b3
3 changed files with 42 additions and 9 deletions
+28
View File
@@ -704,6 +704,34 @@ class UM_User {
return $role_title;
}
/**
* Get role slug by ID
* @param integer $id
* @return string
*/
function get_role_slug_by_id( $id ) {
global $wpdb, $ultimatemember;
$args = array(
'posts_per_page' => 1,
'post_type' => 'um_role',
'page_id' => $id,
'post_status' => array('publish'),
);
$roles = new WP_Query( $args );
$role_slug = '';
if ( $roles->have_posts() ) {
$role_slug = $roles->post->post_name;
}
wp_reset_query();
return $role_slug;
}
/***
*** @Update one key in user meta
***/