int bone_requserprofile(BONEHANDLE bhnd, const char *username)

Description
Requests the user profile of a Bone user.

Callback
BONE_CALLBACK_REQUSERPROFILE

Notes
The function parameters are the BONEHANDLE and the Bone username.  Note that you can only request the profile of your own username (case sensitive) if you are not an administrator.

Example

bone_setcallback(BONE_CALLBACK_REQUSERPROFILE, callback_requserprofile);

if (bone_requserprofile(bnd,"BoneUser"))
    printf("Unable to request profile (reason %d).\n",bone_getlasterror());

 

void callback_requserprofile(BONEHANDLE bhnd, int errorcode, const char *username, const char *password, const char *email, int usertype, long creation, long lastlogin, int selfcreated, int isdisabled)
{
    if (errorcode)
    {
        printf("Unable to query profile (reason: %d).",errorcode);
    }
    else
    {
        printf("Profile of %s:\n", username);
        printf("Password: %s\n Email: %s\n usertype: %d\n account created: %d\n last login: %d\n self created: %d\n disabled: %d", password, email, usertype , creation, last login, self created, isdisabled);
    }
}