Welcome to Geeklog, Anonymous Thursday, October 03 2024 @ 11:12 pm EDT
Geeklog Forums
Group tables in database
Status: offline
Chase
Forum User
Regular Poster
Registered: 03/14/08
Posts: 110
Location:Karachi, Pakistan
Can any one please explain
gl_groups
gl_group_assignments
and how they work. What i want to do is that when a user registers he/she becomes member of loggedin-users and Story Editor group (which i created)
i am thinking i can set them as default values.
But i will need to understand which fields to touch.
also is this the best way.
--
http://TazaKino.com - Pakistani News
Where YOU report the news
gl_groups
gl_group_assignments
and how they work. What i want to do is that when a user registers he/she becomes member of loggedin-users and Story Editor group (which i created)
i am thinking i can set them as default values.
But i will need to understand which fields to touch.
also is this the best way.
--
http://TazaKino.com - Pakistani News
Where YOU report the news
18
16
Quote
Status: offline
jmucchiello
Forum User
Full Member
Registered: 08/29/05
Posts: 985
Assuming you have activate custom registration in the configuration
In lib-custom.php, add this code:
// outside all functions
include_once $_CONF['path'] . 'system/lib-user.php';
// inside CUSTOM_userCreate
$grpid = DB_getItem ($_TABLES['groups'], 'grp_id', "grp_name='". $your_group_name ."'");
USER_addGroup($grpid, $uid);
In general there should be a function for most things you want to do with tables directly and it is better not to hit the tables directly if you can help it.
In lib-custom.php, add this code:
Text Formatted Code
// outside all functions
include_once $_CONF['path'] . 'system/lib-user.php';
// inside CUSTOM_userCreate
$grpid = DB_getItem ($_TABLES['groups'], 'grp_id', "grp_name='". $your_group_name ."'");
USER_addGroup($grpid, $uid);
In general there should be a function for most things you want to do with tables directly and it is better not to hit the tables directly if you can help it.
19
14
Quote
Status: offline
Chase
Forum User
Regular Poster
Registered: 03/14/08
Posts: 110
Location:Karachi, Pakistan
at this point i dont have the custom registration on.
What else would i need to do to make this happen from custom registration.
Since i dont have new fields at time of registration.
do recreate all the forms? if yes how?
i have looked at the custom registration example
--
http://TazaKino.com - Pakistani News
Where YOU report the news
What else would i need to do to make this happen from custom registration.
Since i dont have new fields at time of registration.
do recreate all the forms? if yes how?
i have looked at the custom registration example
--
http://TazaKino.com - Pakistani News
Where YOU report the news
14
13
Quote
Status: offline
Chase
Forum User
Regular Poster
Registered: 03/14/08
Posts: 110
Location:Karachi, Pakistan
add ur code in lib user. problem solved
thanks
--
http://TazaKino.com - Pakistani News
Where YOU report the news
thanks
--
http://TazaKino.com - Pakistani News
Where YOU report the news
13
10
Quote
All times are EDT. The time is now 11:12 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content