Gets profile id from Foundation for the active user.

@return Active user profile id.
557234
String getProfileId() {
        final RxComapiClient client = clientReference.get();
        return client != null ? client.getSession().getProfileId() : null;
    }
1030510
public CmsUUID getId() {

        if (m_id != null) {
            return m_id;
        } else if (m_resource != null) {
            return m_resource.getStructureId();
        } else {
            // only in case of the default element view
            return CmsUUID.getNullUUID();
        }
    }
91134
public T profile_getFBML(Integer userId)
    throws FacebookException, IOException {
    return this.callMethod(FacebookMethod.PROFILE_GET_FBML,
                           new Pair<String, CharSequence>("uid", Integer.toString(userId)));

  }
31861
public static Profile getProfile(HttpServletRequest request) {
        Authentication auth = getAuthentication(request);
        if (auth != null) {
            return auth.getProfile();
        } else {
            return null;
        }
    }
1308769
private static String getCurrentUserName() {
        Authentication a = SecurityContextHolder.getContext().getAuthentication();
        if (a == null) return null;
        org.springframework.security.core.userdetails.User u =
                (org.springframework.security.core.userdetails.User)
                        a.getPrincipal();
        if (u == null) return null;
        return u.getUsername();
    }
1216123
public function get_user_id()
    {
        if (is_object($this->user)) {
            return $this->user->ID;
        }
        else if (isset($_SESSION['user_id'])) {
            return $_SESSION['user_id'];
        }

        return null;
    }
220626
protected User getLoggedUser() {
    UUID userId = getLoggedUserId();
    if (userId == null) {
      return null;
    }
    
    return userController.findUserByKeycloakId(userId);
  }
732540
static final String getUserId() {
    UserService userService = UserServiceFactory.getUserService();
    User loggedIn = userService.getCurrentUser();
    Preconditions.checkState(loggedIn != null, "This servlet requires the user to be logged in.");
    return loggedIn.getUserId();
  }
563631
@Override
    public String getName() {
        CommonProfile profile = this.getProfile();
        if(null == principalNameAttribute) {
            return profile.getId();
        }
        Object attrValue = profile.getAttribute(principalNameAttribute);
        return (null == attrValue) ? null : String.valueOf(attrValue);
    }
1263654
public function getUserId()
    {
        // Is a session mechanism available?
        if (!session_id()) {
            if ($this->sessionManager) {
                $this->sessionManager->start();
            } else {
                throw new MoufException("The session must be initialized before checking if the user is logged. Please use session_start().");
            }
        }
        
        if (isset($_SESSION[$this->sessionPrefix.'MoufUserId'])) {
            return $_SESSION[$this->sessionPrefix.'MoufUserId'];
        } else {
            foreach ($this->authProviders as $provider) {
                /* @var $provider AuthenticationProviderInterface */
                $userId = $provider->getUserId($this);
                if ($userId) {
                    return $userId;
                }
            }
        }
        return null;
    }
436721
public function getProfile() : ?string 
    {
        if ( ! $this->hasProfile()) {
            $this->setProfile($this->getDefaultProfile());
        }
        return $this->profile;
    }
1096337
public Integer getIdFromName(String profileName) {
        PreparedStatement query = null;
        ResultSet results = null;

        try (Connection sqlConnection = sqlService.getConnection()) {
            query = sqlConnection.prepareStatement("SELECT * FROM " + Constants.DB_TABLE_PROFILE +
                                                       " WHERE " + Constants.PROFILE_PROFILE_NAME + " = ?");
            query.setString(1, profileName);
            results = query.executeQuery();
            if (results.next()) {
                Object toReturn = results.getObject(Constants.GENERIC_ID);
                query.close();
                return (Integer) toReturn;
            }
            query.close();
        } catch (SQLException e) {
            e.printStackTrace();
        } finally {
            try {
                if (results != null) {
                    results.close();
                }
            } catch (Exception e) {
            }
            try {
                if (query != null) {
                    query.close();
                }
            } catch (Exception e) {
            }
        }
        return null;
    }
866468
public Long getLoggedUserId() {
    HttpSession session = getRequest().getSession(false);
    return session == null ? null : (Long) session.getAttribute("loggedUserId");
  }
422200
public function getUserId()
    {
        $id = $this->getAttribute('userId');
        if (null === $id && null !== $this->user) {
            $id = $this->userId = $this->user->id;
        }

        return $id;
    }
271065
def get_profile(self):
        
        r = self._session.get(API_URL + "/logins/me")
        r.raise_for_status()

        return r.json()
1280982
public function id()
    {
        if ($this->loggedOut) {
            return;
        }

        $id = $this->session->get($this->getName(), $this->getRecallerId());

        if (is_null($id) && ! is_null($user = $this->user())) {
            $id = $user->getAuthIdentifier();
        }

        return $id;
    }
302016
public Set<Profile> getProfiles()
    {
        final Set<Profile> ret = new HashSet<Profile>();
        if (this.profileNames.isEmpty()) {
            ret.add(Profile.getDefaultProfile());
        } else {
            for (final String name : this.profileNames) {
                ret.add(Profile.getProfile(name));
            }
        }
        return ret;
    }