You are here

class Notifications_User in Notifications 7

User objects

Hierarchy

Expanded class hierarchy of Notifications_User

1 string reference to 'Notifications_User'
notifications_notifications in ./notifications.module
Implementation of hook_notifications()

File

./notifications.object.inc, line 329
Drupal Notifications Framework - Default class file

View source
class Notifications_User extends Notifications_Drupal_Object {
  public $type = 'user';

  /**
   * Load related object or data
   */
  public static function object_load($value) {
    return user_load($value);
  }

  /**
   * Get object name, unfiltered string
   */
  public static function object_name($object) {
    return $object->name;
  }

  /**
   * Get object key
   */
  public static function object_value($user) {
    return $user->uid;
  }

  /**
   * Check user access
   */
  function user_access($account) {
    $user = $this
      ->get_object();
    return $user && $user->uid && ($user->uid == $account->uid || user_access('administer users', $account) || $user->access && $user->status && user_access('access user profiles', $account));
  }

}

Members

Namesort descending Modifiers Type Description Overrides
Notifications_Drupal_Object::get_title public function 1
Notifications_User::$type public property
Notifications_User::object_load public static function Load related object or data Overrides Notifications_Drupal_Object::object_load
Notifications_User::object_name public static function Get object name, unfiltered string Overrides Notifications_Drupal_Object::object_name
Notifications_User::object_value public static function Get object key Overrides Notifications_Drupal_Object::object_value
Notifications_User::user_access function Check user access