You are here

function user_relationship_defaults_user in User Relationships 5

Same name and namespace in other branches
  1. 5.2 plugins/user_relationship_defaults/user_relationship_defaults.module \user_relationship_defaults_user()
  2. 6 user_relationship_defaults/user_relationship_defaults.module \user_relationship_defaults_user()

hook_user()

File

plugins/user_relationship_defaults/user_relationship_defaults.module, line 206
Drupal Module: User Relationship Defaults

Code

function user_relationship_defaults_user($type, &$edit, &$account, $cagetory = NULL) {
  switch ($type) {
    case 'insert':
      if ($defaults = user_relationship_defaults_relationships_load()) {
        foreach ($defaults as $default) {
          user_relationships_request_relationship($default->user, $account, $default->relationship_type, TRUE);
        }
      }
      break;
  }
}