More fields in Membership_users

Got something cool to share with AppGini users? Feel free to post it here!
Post Reply
jd101
Posts: 3
Joined: 2014-03-19 23:00

More fields in Membership_users

Post by jd101 » 2014-03-22 22:24

I noticed that there is 4 custom fields in the users table.

Is there a way to add more to this?

OR even duplicate the table structure into a new table in AppGini and redirect login lookups to that table?

User avatar
a.gneady
Site Admin
Posts: 1281
Joined: 2012-09-27 14:46
Contact:

Re: More fields in Membership_users

Post by a.gneady » 2014-03-29 07:50

Currently not possible without lots of customizations to the generated code unfortunately. But we do plan to add a feature for extending member profiles by adding an additional profiles table where you can add any number of additional fields in future releases.
:idea: AppGini plugins to add more power to your apps:
  • DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
  • Mass Update plugin: Update multiple records at once and improve your workflow efficiency.
  • Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.

Broomie
Posts: 1
Joined: 2015-02-23 22:37

Re: More fields in Membership_users

Post by Broomie » 2015-02-23 22:39

Hi,

Are there any more details on this update and when the additional fields might be available?

Many thanks.

jeannov
Posts: 11
Joined: 2015-04-01 17:14
Location: Trois-Rivieres,QC Canada

Re: More fields in Membership_users

Post by jeannov » 2015-04-06 22:00

Not really looking for more fields but it would be usefull.
Thinking about saving some coding for administration and using AppGini membership,
I would like to have lookup fields for the custom fields in the membership_user table.
At sign-up time, the new user could choose ex: its country, state, city...

Could it be done ?

pt_lveen
Posts: 4
Joined: 2015-06-14 20:09
Contact:

Re: More fields in Membership_users

Post by pt_lveen » 2015-06-19 07:16

I created in AppGini a new table (in my case player) to add more info to the membership_users data. One field is called memberID (defined in MyPHPAdmin as varchar(20) and collate as latin1_swedish_ci (exact like the memberID in the table membership_users))

Next I put one simple trigger on the table membership_users, after a new record is inserted (new member signed up). This trigger inserts one row in the player table and one row in the membership_userrecords table. Now the player record is connected to the new signed up user.

DELIMITER $$

CREATE
TRIGGER `Membership_users_after_insert` AFTER INSERT
ON `Membership_users`
FOR EACH ROW BEGIN

SET @MaxPlayerID = (SELECT MAX(id) + 1 FROM player LIMIT 1);
SET @GroupID = (SELECT groupID FROM membership_groups WHERE name = 'Members' LIMIT 1);

INSERT INTO membership_userrecords (tableName, pkValue, memberID, groupID, dateAdded, dateUpdated)
VALUES ('player', @MaxPlayerID , NEW.memberID, @GroupID, UNIX_TIMESTAMP(NOW()), UNIX_TIMESTAMP(NOW()));

INSERT INTO player(memberID, Name, Gender, Handicap, Country, TimeZone, Handed, Measurement)
VALUES (NEW.memberID, NEW.memberID, 'Male', 54, '<choose>', '<choose>', 'Right', 1);

END$$

DELIMITER ;

Next step is done in the admin area of the website. For all membergroups I unchecked the checkbox to insert new records.

HaroldNHulsey
Posts: 5
Joined: 2015-07-22 07:29

Re: More fields in Membership_users

Post by HaroldNHulsey » 2015-07-22 08:50

I think currently not possible to more fields in membership users, I don't know more about it and I got any information sure I share it. Thank you.

sathukorala
AppGini Super Hero
AppGini Super Hero
Posts: 121
Joined: 2020-02-16 16:29

Re: More fields in Membership_users

Post by sathukorala » 2021-04-05 12:35

a.gneady wrote:
2014-03-29 07:50
Currently not possible without lots of customizations to the generated code unfortunately. But we do plan to add a feature for extending member profiles by adding an additional profiles table where you can add any number of additional fields in future releases.
Is this possible now?

Post Reply