reckez
Forum Replies Created
-
Forum: Plugins
In reply to: [Lockdown WP Admin] How to hide this on other pagesFigured it out!
Forum: Everything else WordPress
In reply to: Remove Website Link and Codes In SupportBut please I need my website links removed. Please
Forum: Everything else WordPress
In reply to: Remove Website Link and Codes In SupportAlright that’s fine but please I need my website links removed. Please
Forum: Everything else WordPress
In reply to: Remove Website Link and Codes In SupportThere is a security risk posting an already-public website core function codes. Please I need them removed and they have nothing to do with helping the general public. Google has indexed that page and It shows up when people search for the platform. Please we need it removed to protect our “professionalism”
Thanks for replying Stefano, here’s a link to how the plugin pages look at the backend.
https://vigowork.com/media/2019/07/newslplugin-error.png
https://vigowork.com/media/2019/07/newslplugin-error-2.pngForum: Plugins
In reply to: [W3 Total Cache] wp_is_mobile() function is ignoredI had to disable fragment cache and object cache, which seems to be the main cause? I can’t tell. I miss an amazing preload function…. I wish it could work… Maybe because my theme is custom built?
Forum: Plugins
In reply to: [W3 Total Cache] wp_is_mobile() function is ignoredI tweaked some settings and it’s working fine. thanks for this amazing plugin.
This is it, still didn’t work. last help please
function register_mail( $user_id ) { $user = new WP_User( $user_id ); $user_email = $user->user_email; $subject = sprintf( __( "Congratulations! You have successfully registered on %s.", ET_DOMAIN ), get_option( 'blogname' ) ); if ( ae_get_option( 'user_confirm' ) ) { $message = ae_get_option( 'confirm_mail_template' ); } else { $message = ae_get_option( 'register_mail_template' ); } $this->wp_mail( $user_email, $subject, $message, array( 'user_id' => $user_id ) ); // Send email notice to admin when had user register if ( ae_get_option( 'sendmail_admin' ) ) { wp_new_user_notification( $user_id ); } } function register_sms( $user_id ) { $user = new WP_User( $user_id ); $mobile = get_user_meta($user_id, 'user_phone'); if ( ae_get_option( 'user_confirm' ) ) { $message = ae_get_option( 'confirm_mail_template' ); } else { $message = ae_get_option( 'register_mail_template' ); } if ( $mobile ) { global $sms; $sms->to = array($mobile); $sms->msg = '$message'; $sms->SendSMS(); } return false; }
please help
Mohammad, it worked. the data saved into the database but sadly didn’t fire a website registration sms to the user like email. here’s the code i wrote for it.
function register_mail( $user_id ) { $user = new WP_User( $user_id ); $user_email = $user->user_email; $subject = sprintf( __( "Congratulations! You have successfully registered on %s.", ET_DOMAIN ), get_option( 'blogname' ) ); if ( ae_get_option( 'user_confirm' ) ) { $message = ae_get_option( 'confirm_mail_template' ); } else { $message = ae_get_option( 'register_mail_template' ); } $this->wp_mail( $user_email, $subject, $message, array( 'user_id' => $user_id ) ); // Send email notice to admin when had user register if ( ae_get_option( 'sendmail_admin' ) ) { wp_new_user_notification( $user_id ); } } function register_sms( $user_id ) { $user = new WP_User( $user_id ); $mobile = $user->user_phone; if ( ae_get_option( 'user_confirm' ) ) { $message = ae_get_option( 'confirm_mail_template' ); } else { $message = ae_get_option( 'register_mail_template' ); } if ( $mobile ) { global $sms; $sms->to = array($mobile); $sms->msg = '$message'; $sms->SendSMS(); } return false; }
I did it like this, is this correct?
/** * insert user by wp_insert_user */ $result = wp_insert_user( $user_data ); $user_pass = $user_data['user_pass']; $mobile = $user_data['user_phone']; if ( $result != false && ! is_wp_error( $result ) ) { /** * update user meta data */ foreach ( $this->meta_data as $key => $value ) { // update if meta data exist if ( isset( $user_data[ $value ] ) ) { update_user_meta( $result, $value, $user_data[ $value ], $mobile ); } }
I found this in a core file of the theme, am i in the right place?
public function insert( $user_data ) { //the insert function could not have the ID if ( isset( $user_data['ID'] ) ) { unset( $user_data['ID'] ); } if ( ! $user_data['user_login'] || ! preg_match( '/^[a-z\d_]{2,20}$/i', $user_data['user_login'] ) ) { return new WP_Error( 'username_invalid', __( "Username only lowercase letters (a-z) and numbers are allowed. e.g johndoe or johndoe1990", ET_DOMAIN ) ); } if ( ! isset( $user_data['user_email'] ) || ! $user_data['user_email'] || $user_data['user_email'] == '' || ! is_email( $user_data['user_email'] ) ) { return new WP_Error( 'email_invalid', __( "Email field is invalid.", ET_DOMAIN ) ); } if ( ! isset( $user_data['user_pass'] ) || ! $user_data['user_pass'] || $user_data['user_pass'] == '' ) { return new WP_Error( 'pass_invalid', __( "Password field is required.", ET_DOMAIN ) ); } if ( ! isset( $user_data['user_phone'] ) || ! $user_data['user_phone'] || $user_data['user_phone'] == '' ) { return new WP_Error( 'pass_invalid', __( "Phone Number field is required.", ET_DOMAIN ) ); } if ( isset( $user_data['repeat_pass'] ) && $user_data['user_pass'] != $user_data['repeat_pass'] ) { return new WP_Error( 'pass_invalid', __( "Repeat Passwords mismatch.", ET_DOMAIN ) ); } $user_data = apply_filters( 'ae_pre_insert_user', $user_data ); if ( ! $user_data || is_wp_error( $user_data ) ) { return $user_data; } //check role for users if ( ! isset( $user_data['role'] ) ) { $user_data['role'] = 'author'; } /** * insert user by wp_insert_user */ $result = wp_insert_user( $user_data ); $user_pass = $user_data['user_pass']; if ( $result != false && ! is_wp_error( $result ) ) { /** * update user meta data */ foreach ( $this->meta_data as $key => $value ) { // update if meta data exist if ( isset( $user_data[ $value ] ) ) { update_user_meta( $result, $value, $user_data[ $value ] ); } }
This is my input in registration.php, I have tried for hours to save it to database but can’t. what do I do from here? do i put some code in functions.php file? please help
<div class="fre-input-field"> <input type="number" name="user_phone" id="user_phone" placeholder="<?php _e("Mobile Number, DON'T USE + e.g 49xxxxx ", ET_DOMAIN);?>"> </div>
- This reply was modified 5 years, 11 months ago by reckez.
Also how to get specific post author meta number? Thank you.
Thank you very much for that. I couldn’t get the user number from registration page and register it in the database. Please help. My registration page is https://vigowork.com/register
https://vigowork.com/register/?role=freelancer
https://vigowork.com/register/?role=employerThey both use a single registration.php file. How to get phone number on registration? Thanks a lot