Home > Backend Development > PHP Tutorial > joomla implements the method of adding new fields for registered users joomla environment joomla introduction joomla compression package

joomla implements the method of adding new fields for registered users joomla environment joomla introduction joomla compression package

WBOY
Release: 2016-07-29 08:50:29
Original
1100 people have browsed it

The example in this article describes how joomla implements adding new fields for registered users. Share it with everyone for your reference, the details are as follows:

Joomla’s original registration was very simple, in order to add the fields you want, such as phone number.

Add this field "telphone" in the database

Modify librariesjoomladatabasetableuser.php

Add new variables in the JTableUser class:

var $telphone = null;

Copy after login

Modification of the page

Modify componentscom_userviewsregistertmpldefault.php

Add the input field here, The name must be the same as the field defined in your database

Copy the code The code is as follows:

It is not good to directly modify the source code, so it is recommended to change the component The page code can be modified in your own templates folder, minimizing modifications to the source code.

Finally, I don’t want to send emails to users. Newly registered users can only take effect after being reviewed by the backend administrator. Comment the following code componentscom_usercontroller.php:

//UserController::_sendMail($user, $password);

Copy after login

Readers who are interested in more joomla related content can check this Site topics: "Introduction to Symfony Framework Tutorial", "Introduction to Yii Framework and Summary of Common Techniques", "Summary of Excellent PHP Development Framework", "Basic Tutorial for Getting Started with Smarty Templates", "Summary of Common Methods in ThinkPHP", "Introduction to PHP Object-Oriented Programming" Tutorial", "php string (string) usage summary", "php+mysql database operation introductory tutorial" and "php common database operation skills summary"

I hope this article will be helpful to everyone based on joomla programming.

The above introduces the method of adding new fields for registered users in joomla, including the content of joomla. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template