Returns the user with nickname nil if no such user exists
 @param [String|Symbol] nickname
 @return [User|nil]
348173
def get(nickname)
      users.each do |user|
        if user.nickname == nickname.to_s
          return user
        end
      end

      nil
    end
853407
def name(self):
        
        uid = self.user_id

        if self._iface_user.get_id() == uid:
            return self._iface.get_my_name()

        return self._iface.get_name(uid)
446685
def users
      identifier = ::CurrentUser.identifier

      if identifier.respond_to? :call
        ::User.all.sort { |x,y| identifier.call(x) <=> identifier.call(y) }
      else
        ::User.order identifier.to_s
      end
    end
987952
def lookup_identifier(name)
      if has_rule?(name)
        ident = lookup_rule(name)
      elsif has_terminal?(name)
        ident = @terminals[name]
      else
        ident = nil
      end

      return ident
    end
854247
def anonymous_or_user_attr(attr)
      unless self.user_id.nil?
        mthd = "user_#{attr.to_s}"
        # TODO: rails caching is messing this relationship up.
        #       will .user work even if model name is something else. e.g. AdminUser ??
        self.user.send(attr)
      else
        case attr
        when :cornerstone_name
          self.send(:name)
        when :cornerstone_email
          self.send(:email)
        end
      end
    end
496916
public ServerUpdater setNickname(User user, String nickname) {
        delegate.setNickname(user, nickname);
        return this;
    }
778762
def get(self):
        
        self._user = self._client.get(
            url=self._client.get_full_url(
                self.get_path(
                    'single', realm=self._realm_name, user_id=self._user_id
                )
            )
        )
        self._user_id = self.user["id"]
        return self._user
189039
def get_user(self, name):
        
        try:
            return self._user_manager.get(name)
        except exc.NotFound:
            raise exc.NoSuchDatabaseUser("No user by the name '%s' exists." %
                    name)
930158
async def get_friendly_name(self) -> Text:
        

        if 'first_name' not in self._user:
            user = await self._get_full_user()
        else:
            user = self._user

        return user.get('first_name')
166925
def get_member_ibutton(self, val):
        
        members = self.__con__.search_s(
            CSHMember.__ldap_user_ou__,
            ldap.SCOPE_SUBTREE,
            "(ibutton=%s)" % val,
            ['ipaUniqueID'])
        if members:
            return CSHMember(
                    self,
                    members[0][1]['ipaUniqueID'][0].decode('utf-8'),
                    False)
        return None
598775
def current_user_name_or_id
      require 'etc' if !defined?(Etc)
      begin
        user = Etc.getpwuid(Process.uid)
      rescue ArgumentError
        user = nil
      end
      if user
        return user.name
      else
        return "##{Process.uid}"
      end
    end
802628
def currentUser(extras=nil)
      method = 'currentUser'
      type = User
      args = {}
      args[:extras] = extras if extras
      return_object type,method,args,true
    end
531029
def user(id)
      if id
        cached_user = users.detect {|u| u[:id] == id }
        user = cached_user || fetch_user(id)
        self.users << user
        user
      end
    end
1126359
def get_user_by_username(name)
      resp = request('getUserByUsername', username: name)['user']
      resp['user_id'].nil? ? nil : User.new(self, resp)
    end
1115340
def get_signed_in_scope
      if signed_in?
        Devise.mappings.keys.each do |res|
          l = send "#{res.to_s}_signed_in?"
          if send "#{res.to_s}_signed_in?"
            return res.to_s
          end
        end
      end
      return 'user'
    end
945906
def parse_user(user)
      user.slice! 0, 4 if user =~ /sip:/
      user = user.split(":")[0]
      user, domain = user.split("@")
      domain ||= "[remote_ip]"
      [user, domain]
    end
1236798
def user=(user)
      session[:user] = nil && return if user.nil?
      session[:user] = store_user(user)
      @user = session[:user] ? user : session[:user]  
    end