Display all addresses associated with the current user
194339
public function addaddress()
    {
        $form = $this->AddressForm();
        $form
            ->Fields()
            ->dataFieldByName("OwnerID")
            ->setValue(Member::currentuserID());

        return $this
            ->owner
            ->customise(array(
                "ClassName" => "AccountPage",
                "Title"     => _t("Checkout.AddAddress", "Add Address"),
                "Form"  => $form
            ))->renderWith(array(
                "UserAccount_addaddress",
                "Users",
                "Page"
            ));
    }
1286095
def find_user_emails(self, user):
        """"""
        user_emails = self.db_adapter.find_objects(self.UserEmailClass, user_id=user.id)
        return user_emails
1114101
def find_associated_with_address(self, instance):
    
    objects = []
    objects += list(Project.objects.filter(address=instance))
    objects += list(Organization.objects.filter(address=instance))

    return objects
611030
def show_user(self, user):
        
        res = self.post('loadUsers', {'userId': user})
        if isinstance(res, list) and len(res) > 0:
            res = res[0]
        return _fix_user(res)
933470
def user_list(profile=None, **connection_args):
    '''
    
    '''
    kstone = auth(profile, **connection_args)
    ret = {}
    for user in kstone.users.list():
        ret[user.name] = dict((value, getattr(user, value, None)) for value in dir(user)
                              if not value.startswith('_') and
                              isinstance(getattr(user, value, None), (six.string_types, dict, bool)))
        tenant_id = getattr(user, 'tenantId', None)
        if tenant_id:
            ret[user.name]['tenant_id'] = tenant_id
    return ret
876791
def query_all_user():
        '''
        
        '''
        return TabLog.select().where(TabLog.user_id != 'None').distinct(TabLog.user_id).order_by(
            TabLog.user_id
        )
688030
def service_addresses(service, index = nil)
      loop do
        addresses, nindex = service_addresses!(service, index)
        return [addresses, nindex] if addresses && nindex
      end
    end
1194892
def list_users(verbose=True, hashes=False):
    '''
    
    '''
    users = {} if verbose else []

    if verbose:
        # parse detailed user data
        res = __salt__['cmd.run_all'](
            'pdbedit --list --verbose {hashes}'.format(hashes="--smbpasswd-style" if hashes else ""),
        )

        if res['retcode'] > 0:
            log.error(res['stderr'] if 'stderr' in res else res['stdout'])
            return users

        user_data = {}
        for user in res['stdout'].splitlines():
            if user.startswith('-'):
                if 'unix username' in user_data:
                    users[user_data['unix username']] = user_data
                user_data = {}
            elif ':' in user:
                label = user[:user.index(':')].strip().lower()
                data = user[(user.index(':')+1):].strip()
                user_data[label] = data

        if user_data:
            users[user_data['unix username']] = user_data
    else:
        # list users
        res = __salt__['cmd.run_all']('pdbedit --list')

        if res['retcode'] > 0:
            return {'Error': res['stderr'] if 'stderr' in res else res['stdout']}

        for user in res['stdout'].splitlines():
            if ':' not in user:
                continue
            user_data = user.split(':')
            if len(user_data) >= 3:
                users.append(user_data[0])

    return users
434576
def show(self, username):
        """"""
        filter = ['(objectclass=posixAccount)', "(uid={})".format(username)]
        return self.client.search(filter)
615288
def list_address(self, domain):
        " "

        try:
            response = self.get('/REST/ARecord/%s/%s' % (
                self.zone, domain))
        except self.NotFoundError:
            return []

        # Return a generator with the addresses.
        addresses = response.content['data']
        return [Address.from_url(self, uri) for uri in addresses]
1118647
def _addr(self):
        
        group_by = self._config['address_group_by']

        assert not self._flags['address'], "{} address already assigned".format(self._name)
        assert group_by in ('element', 'variable')

        m0 = self.system.dae.m
        n0 = self.system.dae.n
        mend = m0 + len(self._algebs) * self.n
        nend = n0 + len(self._states) * self.n

        if group_by == 'variable':
            for idx, item in enumerate(self._algebs):
                self.__dict__[item] = list(
                    range(m0 + idx * self.n, m0 + (idx + 1) * self.n))
            for idx, item in enumerate(self._states):
                self.__dict__[item] = list(
                    range(n0 + idx * self.n, n0 + (idx + 1) * self.n))
        elif group_by == 'element':
            for idx, item in enumerate(self._algebs):
                self.__dict__[item] = list(
                    range(m0 + idx, mend, len(self._algebs)))
            for idx, item in enumerate(self._states):
                self.__dict__[item] = list(
                    range(n0 + idx, nend, len(self._states)))

        self.system.dae.m = mend
        self.system.dae.n = nend

        self._flags['address'] = True
1137328
public static function indexcontacts()
    {
        $db = self::db();

        // iterate over all users
        $sql_result = $db->query("SELECT `user_id` FROM " . $db->table_name('users', true) . " ORDER BY `user_id`");
        while ($sql_result && ($sql_arr = $db->fetch_assoc($sql_result))) {
            echo "Indexing contacts for user " . $sql_arr['user_id'] . "...\n";

            $contacts = new rcube_contacts($db, $sql_arr['user_id']);
            $contacts->set_pagesize(9999);

            $result = $contacts->list_records();
            while ($result->count && ($row = $result->next())) {
                unset($row['words']);
                $contacts->update($row['ID'], $row);
            }
        }

        echo "done.\n";
    }
1092087
public function index($user_uid)
    {
        $user = Subbly::api('subbly.user')->find($user_uid);

        $options = $this->getParams('offset', 'limit', 'includes', 'order_by');

        $userAddresses = Subbly::api('subbly.user_address')->findByUser($user, $options);

        return $this->jsonCollectionResponse('user_addresses', $userAddresses);
    }
248218
public function index() {
        $this->Users = TableRegistry::get('Builder.Users');
        $query = $this->Users->find('all');
        $query->where($this->filteredWhereConditions());
        $query->limit(1000);
        $this->set('data', $query->toArray());
        $this->set('_serialize', ['data']);
    }
15831
def mac_addresses(self):
        
        mac_addresses = [self.findtext("general/mac_address")]
        if self.findtext("general/alt_mac_address"):
            mac_addresses.append(self.findtext("general/alt_mac_address"))
            return mac_addresses
531594
function(apiKey, contactList, fromAddress,
        toAddress, ccAddresses, bccAddresses, contentType, subject, htmlBody,
        textBody, _templateId) {}
444470
def get_current_user(self):
        """"""
        url = self.current_user_url
        result = self.get(url)
        return result