Adding extra Columns in All users Table

Adding extra Columns in All users Table

بذریعہ Mohammed Zuheb Ahamed -
جوابات کی تعداد: 3

I want to know how to add extra fields in the all users table, Two column names are User Zone and User State

درجہ بندی کا اوسط: -
Mohammed Zuheb Ahamed کے جواب میں

Re: Adding extra Columns in All users Table

بذریعہ Josh Willcock -
Core developers کی تصویر Plugin developers کی تصویر

Modifying the All User table would be a bad idea. You never want to modify Moodle Core tables as it can cause issues.


I would recommend using Profile fields or creating your own table if it is for your own plugin?


Could you expand on Why you want to do this? The end result or needed functionality would enable us to assist you further with this

Mohammed Zuheb Ahamed کے جواب میں

Re: Adding extra Columns in All users Table

بذریعہ scott braithwaite -

As Josh said you would not want to modify the user table as this can cause you all sorts of problems.  We have used the table mdl_user_info_field to add extra fields for our users as we needed to get extra data and this seems to work well

درجہ بندی کا اوسط:Useful (1)