I gang

Autogenerated student number instead of username in Wordpress

My friend did a custom PHP code to generate a "student number" on my website instead of the regular generated username. So users get a consecutive student number when they sign-up instead of the random username.

Unfortunately, each time I upgrade wordpress the code is gone and I have to manually edit the files again and add his code.

So I want a developer to take the code my friend did and install it in a way it will survive over Wordpress upgrades. Can you make a plug-in?

Please mention my name: Ishi, so I see you have read the description of this project.

This is the code:

There two two code modifications. The first is to the checkout function of woo commerce. The second is a modification to the add-user function within Word Press. I assumed you’d have two possible ways that users would be added into the system, the first through a website purchase thus the modification of [url removed, login to view] which is located under wp-content/plugins/woocommerce/includes/, the second is through the admin function of wordpress, it’s a file called [url removed, login to view], that’s under the directory wp-admin.

For [url removed, login to view], the following needs to be done.

1 - Search for // Customer Accounts (should be line 606).

2 - Comment out $username = ! empty( $this->posted['account_username'] ) ? $this->posted['account_username'] : ‘';

3 - Insert the following code just after that line

//Hussain modification

global $wpdb;

$result = $wpdb->get_var( "SELECT * FROM {$wpdb->users} WHERE ID=(SELECT MAX(ID) FROM {$wpdb->users})");

$result += 17001;

$local_username = 'sk'.$result;

// End of Hussain mod

4 - Comment out this line

//$new_customer = wc_create_new_customer( $this->posted['billing_email'], $usrname, $password );

5 - Replace with:

$new_customer = wc_create_new_customer( $this->posted['billing_email'], $local_username, $password );

6 - search for reference to display_name, replace the variable that’s after => to be $local_username

For [url removed, login to view] make the following changes:

1 - search for line $creating = isset( $_POST['createuser'] ); (it should be line 383)

2 - Comment out this line $new_user_login = $creating && isset( $_POST['user_login'] ) ? wp_unslash( $_POST['user_login'] ) : ‘';

3 - Replace with //Hussain modification

global $wpdb;

$result = $wpdb->get_var( "SELECT * FROM {$wpdb->users} WHERE ID=(SELECT MAX(ID) FROM {$wpdb->users})");

$result += 17001;

$new_user_login = 'SK'.$result;

// End of Hussain mod

Færdigheder: MySQL, PHP, WordPress

Se mere: wordpress generate username from email, username_exists, how to generate registration number in php, wordpress create user, wordpress unique identifier, generate unique id php, wordpress user id, wordpress generate unique id, wordpress tell friend email, wordpress email friend script, wordpress send friend script, student number evaluation system, number database queries wordpress, limit number posts day wordpress, wordpress email friend

Om arbejdsgiveren:
( 10 bedømmelser ) Koh Phangan, Thailand

Projekt-ID: #15123766

Tildelt til:

deep0209

Hi Ishi, I can create a plugin using your friend's code, so that you dont have to add it again after upgrade. We can have a discussion to check and start project Relevant Skills and Experience I have expertise in PHP Mere

$122 USD in 3 dage
(54 bedømmelser)
5.8

46 freelancere byder i gennemsnit $189 for dette job

OutsourceMan

Hello Ishi, Thank you so much for posting your requirements! We are ready to help you with code modifications. Can we discus little more! We are ready to start now! Relevant Skills and Experience Here is some sites we Mere

$147 USD in 2 dage
(282 bedømmelser)
7.9
marketingmindz

Hello Ishi, How are you? We're a IT company with 5+ years of experience with WordPress and developed 250+ websites and 100+ plugins, we are pretty much sure to help you with robust code. Relevant Skills and Experienc Mere

$263 USD in 10 dage
(125 bedømmelser)
8.0
Risalat1

Ready to work with you, could you please send me some more details about your project so we will estimate it accordingly.... Relevant Skills and Experience Ready to work with you, could you please send me some more de Mere

$255 USD in 7 dage
(300 bedømmelser)
7.7
dbuglab

Hi Being an expert I have read your requirement very carefully and ready to accomplish this task asap. Having 6 years experience in MySQL, PHP, WordPress I am pretty much sure that I can complete this task. Here a Mere

$155 USD in 3 dage
(101 bedømmelser)
7.0
submitbuzzz

"Hi Thanks for posting this requirement. We are, India based website design & development company since 5 years effectively deliver and concentrate in high quality design & development." Relevant Skills and Experien Mere

$400 USD in 5 dage
(124 bedømmelser)
6.6
alif8

Love the sound of your [url removed, login to view] 8+ years of experience. services that we provide: app & web design & dev., graphic design, content writing, SEO, hosting. message me for more detail. Shikha Relevant Skills and Experi Mere

$155 USD in 3 dage
(67 bedømmelser)
6.0
singhking2807

Putting the code in a plugin so it will be there after update. Relevant Skills and Experience I am expert in the following : PHP, Wordpress, HTML, CSS, JQUERY, JAVASCRIPT, AJAX, MONGO, DATABASEs, Website Design and De Mere

$88 USD på 1 dag
(43 bedømmelser)
5.4
kawalecove

Hello Sir, I checked your requirement and i can do that can you please contact me so that we can discuss further. Relevant Skills and Experience We are a team of 45 persons including developers and designers and all h Mere

$133 USD in 3 dage
(52 bedømmelser)
5.7
vervelogicin

Hey, I have gone through your job post and want to discuss some points regarding your requirements. Therefore, would request you to initiate the chat in order to clarify my queries/comments. Relevant Skills and Expe Mere

$140 USD in 3 dage
(16 bedømmelser)
5.6
altarsft

I understood the requirement and having solution for the same Relevant Skills and Experience Could you please come online to start the work quickly Proposed Milestones $222 USD - Project work

$222 USD in 3 dage
(47 bedømmelser)
5.9
artifexonline

Hi, I have reviewed your requirement and I can do this job as per your requirement. We have huge expertise in WORDPRESS ,Payment gateway, Laravel, Node.Js , React.Js, CakePHP, Codeigniter, Angular.js, Bootstrap, AP Mere

$250 USD in 3 dage
(32 bedømmelser)
5.8
freelancerlia

Hi there, I think that the solutions here is to use WP hooks on login_form_register. This means that the changes will be located in [url removed, login to view] file ( inside theme folder ). This way your changes will be safe when Mere

$88 USD på 1 dag
(30 bedømmelser)
4.9
humrobo

Hi Ishi, Hope you doing great !!! >> Regarding your Project I have read your job description along and assure you that I am a perfect fit for the job. >>My Experience: I am proficient with the core t Mere

$188 USD in 3 dage
(10 bedømmelser)
5.1
suniljoshi151

7 yrs of vast experience in MySQL, Ms-Sql, Mongo DB, Oracle, Java,PHP, HTML, Java, WordPress, Web development and management, database development Be free to ping me for any advice Relevant Skills and Experience MySQL Mere

$200 USD in 3 dage
(53 bedømmelser)
5.9
satinderrana

Greetings, I have read the project description and I can complete your project on time and within your budget. I have worked on similar wordpress projects to what you are looking for, and I am confident I can excee Mere

$200 USD på 1 dag
(30 bedømmelser)
4.8
karishma23

Hiiiii I saw your proposal and understood completely . I have more than 4 year of experience in the same domain . I complete your task on time and in budget with great accuracy. Waiting for your reply Thanks

$222 USD in 2 dage
(10 bedømmelser)
4.6
sureshchoudhary

Hello ISHI With Over 7 years of experience under my belt. I am specializing in building website; please give your valuable time to take a look at some of our websites. Relevant Skills and Experience http://acqvin. Mere

$155 USD in 3 dage
(13 bedømmelser)
4.5
Dominantsoftech

Hello There , Greetings of the days!! I hope You Doing well. I am Aditya. I Read carefully and Analyzed Your Provide Project Requirement for Autogenerated student number instead of username in WP. Relevant Skills and Mere

$100 USD in 3 dage
(15 bedømmelser)
4.6
sahildeveloper01

Hello Sir, I've gone through your requirements. I've prior experience with all the skills needed for the website. Relevant Skills and Experience I have Experience of more than 6 years in Web Designing,Wordpress,codeig Mere

$120 USD på 1 dag
(17 bedømmelser)
4.2
BespokeDMedia

Hello, Without wasting your time Let's begin to errand. As your task is very interesting and I am very excited to work on this so please hire me as soon as possible so that I can start your work. Relevant Skills and E Mere

$155 USD in 3 dage
(5 bedømmelser)
4.8