Commit 28d31338 authored by Leigh Stoller's avatar Leigh Stoller

Add optional argument to AddNewMember() to set the initial trust level.

parent 38cee316
......@@ -621,7 +621,7 @@ class Group
#
# Add *new* member to group; starts out with trust=none.
#
function AddNewMember($user) {
function AddNewMember($user, $trust = TBDB_TRUSTSTRING_NONE) {
$uid = $user->uid();
$uid_idx = $user->uid_idx();
$pid = $this->pid();
......@@ -634,7 +634,7 @@ class Group
" trust, date_applied) ".
"values ('$uid', '$uid_idx', '$gid', '$gid_idx', ".
" '$pid', '$pid_idx', ".
" 'none', now())")) {
" '$trust', now())")) {
return -1;
}
return 0;
......
......@@ -463,10 +463,10 @@ class Project
#
# Add *new* member to project group; starts out with trust=none.
#
function AddNewMember($user) {
function AddNewMember($user, $trust = TBDB_TRUSTSTRING_NONE) {
$group = $this->DefaultGroup();
return $group->AddNewMember($user);
return $group->AddNewMember($user, $trust);
}
#
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment