mongodb\rbac\MongoDbManager assign()

assign() public method

Assigns a role to a user.

public yii\rbac\Assignment assign ( $role, $userId )
$role yii\rbac\Role
$userId string|integer

The user ID (see yii\web\User::$id)

return yii\rbac\Assignment

The role assignment information.

throws Exception

if the role has already been assigned to the user

doc_Yii
2016-10-30 17:09:14
Comments
Leave a Comment

Please login to continue.