Example #1
0
    function __toString()
    {
        if ($this->isLocked()) {
            return __('Locked (Administrative)');
        }
        if (!$this->isConfirmed()) {
            return __('Locked (Pending Activation)');
        }
        // ... Other flags here (password reset, etc).
        return __('Active (Registered)');
    }
}
/*
 *  Generic user list.
 */
class UserList extends ListObject
{
    function __toString()
    {
        $list = array();
        foreach ($this->storage as $user) {
            if (is_object($user)) {
                $list[] = $user->getName();
            }
        }
        return $list ? implode(', ', $list) : '';
    }
}
require_once INCLUDE_DIR . 'class.organization.php';
User::_inspect();
UserAccount::_inspect();