src/Administration.php
public function addRoleForUserById($userId, $role) {
		$userFound = $this->addRoleForUserByColumnValue(
			'id',
			(int) $userId,
			$role
		);

		if ($userFound === false) {
			throw new UnknownIdException();
		}
	}
public function addRoleForUserById($userId, $role) {
		$userFound = $this->addRoleForUserByColumnValue(
			'id',
			(int) $userId,
			$role
		);

		if ($userFound === false) {
			throw new UnknownIdException();
		}
	}
public function addRoleForUserById ( $ userId , $ role ) { $ userFound = $ this -> addRoleForUserByColumnValue ( 'id' , ( int ) $ userId , $ role ) ; if ( $ userFound === false ) { throw new UnknownIdException ( ) ; } }
Assigns the specified role to the user with the given ID

A user may have any number of roles (i.e. no role at all, a single role, or any combination of roles)

@param int $userId the ID of the user to assign the role to
@param int $role the role as one of the constants from the {@see Role} class
@throws UnknownIdException if no user with the specified ID has been found

@see Role
Assigns the specified role to the user with the given ID