public static function UserRestrictions::getInstance in User restrictions 7
5 calls to UserRestrictions::getInstance()
- UserRestrictions::getInstanceByMask in ./
user_restrictions.classes.inc - user_restrictions_block_mail in ./
user_restrictions.rules.inc - Rules callback to block an email.
- user_restrictions_block_name in ./
user_restrictions.rules.inc - Rules callback to block a username.
- user_restrictions_load in ./
user_restrictions.module - Loads the restriction rule from the database.
- user_restrictions_ui_edit_rule_form in ./
user_restrictions_ui.admin.inc - Form generator for the user restriction edit form.
File
- ./
user_restrictions.classes.inc, line 149 - Contains the classes used by the User restrictions module.
Class
- UserRestrictions
- The main class used by the User Restrictions module.
Code
public static function getInstance($id = '') {
if ($id) {
$instance = db_query('SELECT * FROM {user_restrictions} WHERE urid = :urid', array(
':urid' => $id,
), array(
'fetch' => 'UserRestrictions',
))
->fetch();
}
else {
$instance = new UserRestrictions();
}
return empty($instance) ? FALSE : $instance;
}