function user_restrictions_block_name in User restrictions 7
Rules callback to block a username.
Parameters
object $user:
File
- ./
user_restrictions.rules.inc, line 77 - Rules_info for the User restrictions module.
Code
function user_restrictions_block_name($user) {
$instance = UserRestrictions::getInstance();
$instance->type = 'name';
$instance->mask = $user->name;
$instance
->save();
}