mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-16 13:13:33 +09:00
Merge branch 'master' of https://github.com/ultimatemember/ultimatemember
This commit is contained in:
@@ -2,6 +2,10 @@
|
||||
- Layout
|
||||
*/
|
||||
|
||||
.um-account i {
|
||||
vertical-align: baseline !important;
|
||||
}
|
||||
|
||||
.um-account p.um-notice {
|
||||
margin: 0 0 20px 0 !important;
|
||||
padding: 12px 15px !important;
|
||||
@@ -81,12 +85,21 @@
|
||||
.um-account-meta.radius-2 img { -moz-border-radius: 4px;-webkit-border-radius: 4px;border-radius: 4px }
|
||||
.um-account-meta.radius-3 img { -moz-border-radius: 0;-webkit-border-radius: 0;border-radius: 0 }
|
||||
|
||||
.um-account-name {
|
||||
padding-top: 12px;
|
||||
}
|
||||
|
||||
.um-account-name a {
|
||||
font-weight: bold;
|
||||
color: #555 !important;
|
||||
color: #555;
|
||||
text-decoration: none !important;
|
||||
font-size: 18px;
|
||||
line-height: 2em;
|
||||
line-height: 1.4em;
|
||||
}
|
||||
|
||||
.um-account-profile-link a {
|
||||
font-size: 13px;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -62,6 +62,10 @@
|
||||
display: table;
|
||||
}
|
||||
|
||||
.um-cover-add i {
|
||||
font-size: 36px;
|
||||
}
|
||||
|
||||
.um-cover-add span {
|
||||
display: table-cell;
|
||||
vertical-align: middle;
|
||||
@@ -141,6 +145,10 @@
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
.um-profile-edit i {
|
||||
font-size: 30px;
|
||||
}
|
||||
|
||||
/*
|
||||
- Header without cover enabled
|
||||
*/
|
||||
@@ -264,6 +272,10 @@
|
||||
line-height: 1.7em;
|
||||
}
|
||||
|
||||
.um-name a {
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
.um-meta {
|
||||
font-size: 15px;
|
||||
}
|
||||
@@ -314,7 +326,7 @@ font-weight: normal;
|
||||
|
||||
.um-profile-note {
|
||||
display: none;
|
||||
text-align: center;
|
||||
text-align: center !important;
|
||||
padding-top: 20px;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -9,6 +9,8 @@
|
||||
|
||||
if ( $_POST['user_password'] && $_POST['confirm_user_password'] ) {
|
||||
$changes['user_pass'] = $_POST['user_password'];
|
||||
add_filter('send_password_change_email','um_send_password_change_email');
|
||||
|
||||
}
|
||||
|
||||
foreach( $_POST as $k => $v ) {
|
||||
@@ -330,7 +332,10 @@
|
||||
|
||||
<div class="um-account-meta-img"><a href="<?php echo um_user_profile_url(); ?>"><?php echo get_avatar( um_user('ID'), 120); ?></a></div>
|
||||
|
||||
<div class="um-account-name"><a href="<?php echo um_user_profile_url(); ?>"><?php echo um_user('display_name'); ?></a></div>
|
||||
<div class="um-account-name">
|
||||
<a href="<?php echo um_user_profile_url(); ?>"><?php echo um_user('display_name'); ?></a>
|
||||
<div class="um-account-profile-link"><a href="<?php echo um_user_profile_url(); ?>" class="um-link"><?php _e('View profile','ultimatemember'); ?></a></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -362,7 +367,10 @@
|
||||
|
||||
<?php } ?>
|
||||
|
||||
<div class="um-account-name uimob800-hide"><a href="<?php echo um_user_profile_url(); ?>"><?php echo um_user('display_name', 'html'); ?></a></div>
|
||||
<div class="um-account-name uimob800-hide">
|
||||
<a href="<?php echo um_user_profile_url(); ?>"><?php echo um_user('display_name', 'html'); ?></a>
|
||||
<div class="um-account-profile-link"><a href="<?php echo um_user_profile_url(); ?>" class="um-link"><?php _e('View profile','ultimatemember'); ?></a></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@@ -34,14 +34,16 @@
|
||||
add_action('um_change_password_process_hook','um_change_password_process_hook');
|
||||
function um_change_password_process_hook( $args ) {
|
||||
global $ultimatemember;
|
||||
extract( $args );
|
||||
|
||||
wp_set_password( $args['user_password'], $args['user_id'] );
|
||||
|
||||
delete_user_meta( $args['user_id'], 'reset_pass_hash');
|
||||
delete_user_meta( $args['user_id'], 'reset_pass_hash_token');
|
||||
|
||||
|
||||
do_action('um_after_changing_user_password', $args['user_id'] );
|
||||
|
||||
|
||||
if ( is_user_logged_in() ) {
|
||||
wp_logout();
|
||||
}
|
||||
@@ -50,17 +52,31 @@
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Overrides password changed notification
|
||||
*
|
||||
*/
|
||||
function um_send_password_change_email( $args ){
|
||||
|
||||
global $ultimatemember;
|
||||
|
||||
um_fetch_user( $user_id );
|
||||
|
||||
$ultimatemember->user->password_changed();
|
||||
|
||||
um_reset_user();
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/***
|
||||
*** @This is executed after changing password
|
||||
***/
|
||||
add_action('um_after_changing_user_password','um_after_changing_user_password');
|
||||
function um_after_changing_user_password( $user_id ) {
|
||||
global $ultimatemember;
|
||||
um_fetch_user( $user_id );
|
||||
|
||||
$ultimatemember->mail->send( um_user('user_email'), 'changedpw_email' );
|
||||
|
||||
um_reset_user();
|
||||
|
||||
}
|
||||
|
||||
/***
|
||||
|
||||
@@ -34,32 +34,45 @@
|
||||
function um_add_user_frontend($args){
|
||||
global $ultimatemember;
|
||||
extract($args);
|
||||
|
||||
if ( isset( $user_email ) && !isset($user_login) ) {
|
||||
$user_login = $user_email;
|
||||
}
|
||||
|
||||
|
||||
if ( isset( $username ) && !isset($args['user_login']) ) {
|
||||
$user_login = $username;
|
||||
}
|
||||
|
||||
if ( ! empty( $first_name ) && ! empty( $last_name ) && ! isset( $user_login ) ) {
|
||||
|
||||
if ( um_get_option('permalink_base') == 'name' ) {
|
||||
$user_login = rawurlencode( strtolower( str_replace(" ",".",$first_name." ".$last_name ) ) );
|
||||
}else if ( um_get_option('permalink_base') == 'name_dash' ) {
|
||||
$user_login = rawurlencode( strtolower( str_replace(" ","-",$first_name." ".$last_name ) ) );
|
||||
}else if ( um_get_option('permalink_base') == 'name_plus' ) {
|
||||
$user_login = strtolower( str_replace(" ","+",$first_name." ".$last_name ) );
|
||||
}else{
|
||||
$user_login = strtolower( str_replace(" ","",$first_name." ".$last_name ) );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$unique_userID = $ultimatemember->query->count_users() + 1;
|
||||
|
||||
if ( ! isset( $user_login ) ) {
|
||||
$user_login = 'user' . $unique_userID;
|
||||
}
|
||||
|
||||
if ( isset( $username ) && is_email( $username ) ) {
|
||||
$user_email = $username;
|
||||
}
|
||||
|
||||
if (!isset($user_password)){
|
||||
if ( ! isset( $user_password ) ){
|
||||
$user_password = $ultimatemember->validation->generate();
|
||||
}
|
||||
|
||||
$unique_userID = $ultimatemember->query->count_users() + 1;
|
||||
|
||||
if( !isset($user_email) ) {
|
||||
if( ! isset( $user_email ) ) {
|
||||
$user_email = 'nobody' . $unique_userID . '@' . get_bloginfo('name');
|
||||
}
|
||||
|
||||
if ( !isset( $user_login ) ) {
|
||||
$user_login = 'user' . $unique_userID;
|
||||
}
|
||||
|
||||
|
||||
$creds['user_login'] = $user_login;
|
||||
$creds['user_password'] = $user_password;
|
||||
@@ -67,7 +80,8 @@
|
||||
|
||||
$args['submitted'] = array_merge( $args['submitted'], $creds);
|
||||
$args = array_merge($args, $creds);
|
||||
|
||||
|
||||
|
||||
do_action('um_before_new_user_register', $args);
|
||||
|
||||
$user_id = wp_create_user( $user_login, $user_password, $user_email );
|
||||
|
||||
@@ -12,10 +12,37 @@ class UM_Permalinks {
|
||||
|
||||
add_action('init', array(&$this, 'activate_account_via_email_link'), 1);
|
||||
|
||||
remove_action( 'wp_head', 'rel_canonical' );
|
||||
add_action('wp_head', array(&$this, 'um_rel_canonical_'), 9 );
|
||||
|
||||
$this->current_url = $this->get_current_url();
|
||||
|
||||
}
|
||||
|
||||
/***
|
||||
*** @SEO canonical href bugfix
|
||||
***/
|
||||
function um_rel_canonical_() {
|
||||
if ( !is_singular() )
|
||||
return;
|
||||
|
||||
global $ultimatemember, $wp_the_query;
|
||||
if ( !$id = $wp_the_query->get_queried_object_id() )
|
||||
return;
|
||||
|
||||
if( $this->core['user'] == $id ) {
|
||||
$link = $this->get_current_url();
|
||||
echo "<link rel='canonical' href='$link' />\n";
|
||||
return;
|
||||
}
|
||||
|
||||
$link = get_permalink( $id );
|
||||
if ( $page = get_query_var('cpage') )
|
||||
$link = get_comments_pagenum_link( $page );
|
||||
echo "<link rel='canonical' href='$link' />\n";
|
||||
|
||||
}
|
||||
|
||||
/***
|
||||
*** @Get query as array
|
||||
***/
|
||||
|
||||
@@ -610,7 +610,8 @@ function um_profile_id() {
|
||||
***/
|
||||
function um_requesting_password_change() {
|
||||
global $post, $ultimatemember;
|
||||
if ( um_is_core_page('password-reset') && isset( $_POST['_um_password_change'] ) == 1 )
|
||||
|
||||
if ( um_is_core_page('account') && isset( $_POST['_um_account'] ) == 1 )
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
@@ -1353,3 +1354,4 @@ function um_user( $data, $attrs = null ) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -434,6 +434,15 @@ class UM_User {
|
||||
$this->password_reset_hash();
|
||||
$ultimatemember->mail->send( um_user('user_email'), 'resetpw_email' );
|
||||
}
|
||||
|
||||
|
||||
/***
|
||||
*** @password changed email
|
||||
***/
|
||||
function password_changed(){
|
||||
global $ultimatemember;
|
||||
$ultimatemember->mail->send( um_user('user_email'), 'changedpw_email' );
|
||||
}
|
||||
|
||||
/**
|
||||
* @function approve()
|
||||
|
||||
Reference in New Issue
Block a user