rbac\ManagerInterface assign()

assign() public abstract method

Assigns a role to a user.

public abstract 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:10:09
Comments
Leave a Comment

Please login to continue.