USER addGroup

提供: GeeklogJpWiki

lib-user.php> USER_addGroup

説明

 boolean USER_addGroup (int $groupid, [int $uid = '']) 

This is part of the Geeklog user implementation. This function looks up whether a user belongs to a specified group and if not adds them to the group

Geeklogでユーザーを実装する手段の一つです。ユーザーがあるグループに所属しているか否か、もし所属していない場合はそのグループに所属させる関数です。

パラメータ

$groupid
Group we want to see if user belongs to and if not add to group

ユーザーが属しているべきグループ、属していない場合そのグループに所属させる

$uid
ID for user to check if in group and if not add user. If empty current user.

ユーザーID:グループに所属していればチェックする、所属していない場合は所属させる。

返り値

true if user is added to group, otherwise false

ユーザーをグループに所属させればtrue、それ以外はfalse。

参考

使用例

個人用ツール