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?
More fields in Membership_users
Re: More fields in Membership_users
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.
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.
Re: More fields in Membership_users
Hi,
Are there any more details on this update and when the additional fields might be available?
Many thanks.
Are there any more details on this update and when the additional fields might be available?
Many thanks.
Re: More fields in Membership_users
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 ?
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 ?
Re: More fields in Membership_users
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.
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.
-
- Posts: 5
- Joined: 2015-07-22 07:29
Re: More fields in Membership_users
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.
-
- AppGini Super Hero
- Posts: 121
- Joined: 2020-02-16 16:29
Re: More fields in Membership_users
Is this possible now?