Go to the source code of this file.
Functions | |
| send_pending_user_email ($group_id, $user_id, $user_message) | |
Variables | |
| $res_user = db_query("SELECT * FROM user WHERE user_id=" . user_getid()) | |
| $row_user = db_fetch_array($res_user) | |
| $form_id = sane_post("form_id") | |
| $result = db_query($sql) | |
| $rows = db_numrows($result) | |
| $sql_without_history | |
| $result_without_history = db_query($sql_without_history) | |
| $rows_without_history = db_numrows($result_without_history) | |
| $result_w = trackers_data_get_watchees(user_getid()) | |
| $rows_w = db_numrows($result_w) | |
| $arr_watchers = array() | |
|
||||||||||||||||
|
Updates Watchee add $func = sane_all("func"); if ($func) { $watchee_id = sane_all("watchee_id"); $group_id = sane_all("group_id"); if ($func == "delwatchee") { Stop watching another user $result_upd = trackers_data_delete_watchees(user_getid(),$watchee_id,$group_id); if (!$result_upd) { fb(_("Unable to remove user from the watched users list, probably a broken URL")); } } if ($func == "addwatchee") { Stop watching another user $result_upd = trackers_data_add_watchees(user_getid(),$watchee_id,$group_id); if (!$result_upd) { fb(_("Unable to add user in the watched users list, probably a broken URL")); } } } ###### function send_pending_user_email($group_id, $user_id, $user_message) ###### sends an email to group admins when a user joins group Definition at line 79 of file groups.php. References $message, $res_admins, $res_grp, $row_grp, db_fetch_array(), db_numrows(), db_query(), group_id, and sendmail_mail(). 00080 { 00081 00082 $res_grp = db_query("SELECT * FROM groups WHERE group_id='$group_id'"); 00083 00084 if (db_numrows($res_grp) < 1) 00085 { 00086 return 0; 00087 } 00088 00089 $row_grp = db_fetch_array($res_grp); 00090 00091 $res_admins = db_query("SELECT user.user_name FROM user,user_group WHERE " 00092 . "user.user_id=user_group.user_id AND user_group.group_id='$group_id' AND " 00093 . "user_group.admin_flags='A'"); 00094 00095 if (db_numrows($res_admins) < 1) 00096 { 00097 return 0; 00098 } 00099 00100 # send one email per admin, in one command line coma separated 00101 $admin_list = ''; 00102 while ($row_admins = db_fetch_array($res_admins)) 00103 { 00104 $admin_list .= ($admin_list ? ',':'').$row_admins['user_name']; 00105 } 00106 00107 $message = approval_user_gen_email($row_grp['group_name'], 00108 $row_grp['unix_group_name'], 00109 $group_id, 00110 user_getname($user_id), 00111 user_getrealname($user_id), 00112 user_getemail($user_id), 00113 $user_message); 00114 00115 00116 sendmail_mail(user_getname(), 00117 $admin_list, 00118 sprintf(_("Membership request for group %s"), $row_grp['group_name']), 00119 $message, 00120 $row_grp['unix_group_name'], 00121 "usermanagement"); 00122 }
|
|
|
Definition at line 273 of file groups.php. |
|
|
Definition at line 129 of file groups.php. Referenced by form_header(). |
|
|
Definition at line 33 of file groups.php. |
|
|
Definition at line 191 of file groups.php. |
|
|
Definition at line 242 of file groups.php. |
|
|
Definition at line 208 of file groups.php. |
|
|
Definition at line 34 of file groups.php. |
|
|
Definition at line 192 of file groups.php. |
|
|
Definition at line 243 of file groups.php. |
|
|
Definition at line 209 of file groups.php. |
|
|
Initial value: "SELECT groups.group_name," . "groups.group_id," . "groups.unix_group_name," . "groups.status," . "user_group.admin_flags " . "FROM groups,user_group " . "WHERE groups.group_id=user_group.group_id " . "AND user_group.user_id='".user_getid()."' " . "AND groups.status='A' " . "GROUP BY groups.unix_group_name " . "ORDER BY groups.unix_group_name" Definition at line 196 of file groups.php. |
|
|
|
Definition at line 250 of file groups.php. |
1.4.4