简体   繁体   English

Joomla 2.5在注册中删除用户名字段

[英]Joomla 2.5 remove username field in registration

I use Joomla 2.5 registration form, but it's massive and I'd like to remove a few fields. 我使用的是Joomla 2.5注册表格,但表格很大,因此我想删除一些字段。 I removed a few lines from components\\com_users\\models\\forms - that allowed me to remove the necessary fields from the screen (username, user, email2). 我从components \\ com_users \\ models \\ forms中删除了几行,这使我可以从屏幕上删除必要的字段(用户名,用户,email2)。 But system still needs them. 但是系统仍然需要它们。 So I decided the problem with two adding 所以我决定加两个
$this->email2=$this->email1; $这 - > EMAIL2 = $这个 - > EMAIL1;
$this->name=$this->username; $这 - >名= $这个 - >用户名;
to libraries/joomla/database/table/user.php in 183 after public function check() 公共功能check()后,在183中访问library / joomla / database / table / user.php
So I need somehow to give a new user a unique username. 因此,我需要以某种方式为新用户提供唯一的用户名。 I have the idea, but it's hard for me to realise. 我有主意,但我很难意识到。 The idea was found on wordpress forum ( https://wordpress.stackexchange.com/questions/52302/is-it-possible-to-remove-username-field-from-the-registration-page-if-so-how ) - the idea is to give a user a current timestamp as a username. 这个想法是在wordpress论坛上找到的( https://wordpress.stackexchange.com/questions/52302/is-it-possible-to-remove-username-field-from-the-registration-page-if-so-how ) -想法是为用户提供当前时间戳作为用户名。 Can you help me adopt it for joomla? 您能帮我将其用于joomla吗?
PS: Please, dont suggest me making a new plugin PS:请不要建议我制作一个新插件

  1. Don't hack the core files you'll never be able to apply security updates without loosing your changes. 不要破解核心文件,否则您将永远不会丢失更改而无法应用安全更新。 (Given that plugins are extremely simple I don't understand your issue) (鉴于插件非常简单,我不明白您的问题)
  2. Use output overrides , ( how to here ), or layout overrides if you must. 如果需要,请使用输出替代 ,( 此处的操作方法 )或布局替代
  3. There are lots of " User Registration " plugins already in existence on the Joomla Extensions Directory . Joomla扩展目录中已经存在许多“ 用户注册 ”插件。
  4. If you don't get the answer you want, try asking on the Joomla Q&A StackExhange site 如果您找不到所需的答案,请尝试在Joomla Q&A StackExhange网站上提问

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM