lib/private/Group/Database.php
/**
	 * Add a user to a group
	 * @param string $uid Name of the user to add to group
	 * @param string $gid Name of the group in which add the user
	 * @return bool
	 *
	 * Adds a user to a group.
	 */
Add a user to a group
@param string $uid Name of the user to add to group
@param string $gid Name of the group in which add the user
@return bool

Adds a user to a group.
Add a user to a group @param string $uid Name of the user to add to group @param string $gid Name of the group in which add the user @return bool Adds a user to a group .
public function addToGroup( $uid, $gid ) {
		$this->fixDI();
		if( !$this->inGroup( $uid, $gid )) {
			$qb = $this->dbConn->getQueryBuilder();
			$qb->insert('group_user')
				->setValue('uid', $qb->createNamedParameter($uid))
				->setValue('gid', $qb->createNamedParameter($gid))
				->execute();
			return true;
		}else{
			return false;
		}
	}
public function addToGroup ( $ uid , $ gid ) { $ this -> fixDI ( ) ; if ( ! $ this -> inGroup ( $ uid , $ gid ) ) { $ qb = $ this -> dbConn -> getQueryBuilder ( ) ; $ qb -> insert ( 'group_user' ) -> setValue ( 'uid' , $ qb -> createNamedParameter ( $ uid ) ) -> setValue ( 'gid' , $ qb -> createNamedParameter ( $ gid ) ) -> execute ( ) ; return true ; } else { return false ; } }
Add a user to a group
 @param string $uid Name of the user to add to group
 @param string $gid Name of the group in which add the user
 @return bool
Add a user to a group @param string $uid Name of the user to add to group @param string $gid Name of the group in which add the user @return bool
// No duplicate entries!