IPS Staff
  • Content count

  • Joined

  • Last visited

About bfarber

  • Rank
  • Birthday 03/07/1983

Contact Methods

IPS Marketplace

  • Resources Contributor Total file submissions: 9

Profile Information

  • Gender Male
  • Location Southwest VA
  • Interests This is my interests, just for "Rikki" :)

Recent Profile Visitors

739,332 profile views
  1. Shot of the waves

    From the album Multiple uploads with custom captions

    Very relaxing to sit and watch
  2. From the album Multiple uploads with custom captions

    We got to see a waterfall that falls over into the Pacific ocean
  3. Lots of hermit crabs

    From the album Multiple uploads with custom captions

    They were everywhere, thousands
  4. Run Run!

    From the album Multiple uploads with custom captions

    The hermit crabs ran all over the place
  5. Hermit Crab

    From the album Multiple uploads with custom captions

    They were everywhere
  6. Pacific Ocean

    From the album Multiple uploads with custom captions

    The powerful Pacific Ocean
  7. Jesus

    From the album Multiple uploads with custom captions

    This is Jesus, he likes to hang out at the bar
  8. Hidden Lizard

    From the album Multiple uploads with custom captions

    He was hanging out near the edge of the road
  9. fixes an XSS issue reported to us in Blog. We would like to thank batpool52! for responsibly disclosing this issue to us.
  10. There was no point to it because setting up the cron task now effectively does what the command line script was doing.
  11. Twisted "Remember me" sign in logic

    Just so it's known, you are quoting a post of mine from five and a half years ago.
  12. Working with members

    If you are developing for 4.0 you will almost certainly need to interact with member accounts at some point.  Thankfully, doing so is easy in 4.0.The primary member class in 4.0 is \IPS\Member./* Get the currently logged in member */ $member = \IPS\Member::loggedIn(); /* Load a specific member by ID */ $member = \IPS\Member::load( 1 ); /* Load a specific member by email address */ $member = \IPS\Member::load( '', 'email' ); /* Get a guest object, or create a new member */ $member = new \IPS\Member; Once you have an instance of \IPS\Member to work with, you can adjust values for that member account by simply setting properties on the object that correspond to the columns in the core_members database table.  For instance, to change a member's language selection you can do the following /* Get the member reference */ $member = \IPS\Member::load( 1 ); $member->language = 2; $member->save(); You need to call the save() method after changing a value in order for it to be saved to the database, otherwise the change will only persist throughout the current page view (or until save() is called at some later point, especially if working with \IPS\Member::loggedIn()).  If you are working with a guest object and you call save() against the object, a new member record will be stored to the database (i.e. this is how you create a new member).There are some getters and setters defined in this class to facilitate actions that need to occur.  For instance, when setting the member's name, the member's seo name is automatically updated and the display name change log is automatically accounted for.Some special properties made available via getters:$member->group: This is a special getter (this is a property, not a method) that will return the member's group data.  This method will automatically merge permissions from the primary group and one or more secondary groups, giving the member the best possible permissions based on their group memberships.$member->groupName: This will return the user's group name, formatted based on the ACP group configuration.$member->groups: This will return an array of all group IDs the member belongs to$member->real_name: This will return the member's name or an empty string for a guest, instead of returning the language string for 'guest' if the user is actually a guest.$member->birthday: This will return the member's localized birthday, taking into account the fact that providing a birth year is optional.$member->photo: This property returns the member's photo as an \IPS\Url object (which can be cast to a string to get the URL to the photo).  The photo is made safe for viewing in the ACP as necessary.$member->rank: This method returns an array representing the title and image for the member's current 'rank' based on the ACP ranks configuration, taking into account the fact that both an uploaded image and "pip" images are supported. There are some methods in the \IPS\Member class you should be familiar with.$member->delete( $setAuthorToGuest=TRUE ): Call this method to delete a member.  The only accepted parameter indicates whether or not to set any content authored by the member to a guest account if TRUE, or to delete that content if FALSE.  Be aware that if you use any external login handlers that support deleting a member, the member will be deleted in those external databases as well.$member->flagAsSpammer(): This method will flag the user account as a spammer, removing or hiding their content based upon the administrator's configuration, and report the spammer to the IPS Spam Service (if configured to do so).$member->unflagAsSpammer(): This method will unflag the user account as a spammer, reporting the change in status to the IPS Spam Service if configured to do so.$member->age( $date=NULL ): Return the member's age.  If an \IPS\DateTime object is supplied as the only parameter to the method, the age is calculated based on the supplied date.$member->location(): Return the member's current location on the site, if they are online.$member->isAdmin(): Return whether the member is an administrator or not.$member->isOnline(): Return whether the member is currently online or not.$member->isBanned(): Return whether the member is banned or not, including temporary bans.$member->inGroup( $group, $permissionArray=FALSE ): Check whether the member belongs to a group or set of groups.  $group can be a group ID (integer), an instance of \IPS\Member\Group, or an array of group IDs or instances of \IPS\Member\Group.  If the user is a member of ANY group in the array, the method returns TRUE.  If $permissionArray is passed as TRUE, the member is checked against the member's permission array instead of the group IDs.$member->language(): Returns an instance of \IPS\Lang for the member based on their preference, or based upon automatic detection/default language setting if the member has not chosen a language.  This is used to retrieve language strings, e.g. \IPS\Member::loggedIn()->language()->addToStack( 'language_string' );$member->url(): Return the URL to the member's profile as an instance of \IPS\Http\Url.$member->acpUrl(): Return the URL to the edit member page in the ACP as an instance of \IPS\Http\Url.$member->link( $warningRef=NULL, $groupFormatting=FALSE ): Return an HTML link to the member's profile.  If $warningRef is passed as a string, this will represent the reference key for warning the member (if the user is warned).  $groupFormatting indicates whether or not to format the name displayed using the member's group formatting options set up by the administrator.$member->profileFields(): Return the custom profile fields for the member as an array of profile field objects.$member->contentProfileFields(): This is similar to profileFields() but instead only returns profile fields designed to display next to the user's content (e.g. in the left sidebar next to a post)$member->ipAddresses(): Return the IP addresses used by the member$member->markAllAsRead(): Mark the entire site as read for the member.$member->markersItems( $app, $key ): Fetch the item markers for the member for the given application and key.$member->markersResetTimes( $app ): Fetch the item marker reset times for the member for the given application.$member->warnings( $limit, $acknowledged=NULL, $type=NULL ): Retrieve the member's warnings. Limit can be passed as an integer to limit how many are returned. If $acknowledged is NULL, all warnings are returned, or TRUE or FALSE can be passed to limit the warnings to only acknowledged or unacknowledged warnings.  If $type is passed as a string, will only pull warnings of that type.$member->reputation(): This method returns the member's reputation as a language string.$member->reputationImage(): This method returns the member's reputation image.$member->encryptedPassword( $password ): Encrypt a plain text password for the member using the member's salt (you may wish to update the salt before calling this for a new password).$member->generateSalt(): Generate a new salt for the member.$member->notificationsConfiguration(): Return the member's notifications configuration.$member->following( $app, $area, $id ): Determine if the member is following a specific app, area and ID combination (all values must be passed)$member->acpRestrictions(): Return the member's ACP restrictions to determine which areas of the ACP the member can access.$member->modPermissions(): Return the member's moderator permissions, if any.$member->reportCount(): Get the number of reported content items that the member can view in the report center.$member->isIgnoring( \IPS\Member $member, $type ): Determine if the member is ignoring another member.  $type must be passed and should be one of 'signatures', 'topics' or 'messages'.$member->createMenu(): Fetch the member's create menu.  This is cached (and cleared automatically when needed).$member->moderateNewContent(): Determine if new content created by the member should be moderated.$member->coverPhoto(): Return the member's cover photo, if any.$member->hasAcpRestriction( $app, $module=NULL, $key=NULL ): Determine if the member has an ACP restriction set for a given $app, $module and $key combination (only $app is required).  If the member does have the restriction set, it means they can access the given area.$member->modPermission( $key=NULL ): Determine if the member has a given moderator permission available for their account (pass NULL to determine if the member has any moderator permissions available).$member->canWarn( \IPS\Member $member ): Determine if the current member can warn another member.$member->checkLoginKey(): Check that the member has a login key set and it is not expired.$member->recountNotifications(): Recount the member's unread notifications.$member->recountContent(): Recount the member's content item contributions.$member->recountReputation(): Recount the member's reputation count.$member->canAccessModule( $module ): $module should be an instance of \IPS\Application\Module and the method returns whether the member can access the module or not.$member->validate(): Mark the member as validated.$member->merge( \IPS\Member $otherMember ): Merge the current member with another member account (note that content merging occurs in the background and may not happen immediately; additionally, the member account that will be removed will not be deleted until all content is merged, this is queued).$member->checkPostsPerDay(): Check the posts per day restrictions to see if the member can visit.$member->checkGroupPromotion(): Check whether the member should be promoted to another group, and do so if so.  Note that save() still needs to be called manually afterwards.$member->clearCreateMenu(): Clear the cached create menu for the member. Note that applications can define MemberSync extensions to perform specific actions at the following points:onDelete: This method in a MemberSync extension is called when a member is deleted (be aware that their content may still exist in the database and be queued for deletion)onCreateAccount: This is called when a new account is created.onProfileUpdate: This is called when an existing account is updatedExtensions are created in the Developer Center of an application in the Admin Control Panel.
  13. 08-07-2015 We are releasing a patch for IP.Board 3.3.x and 3.4.x to address a potential cross-site scripting (XSS) issue, and we are releasing a patch for IP.Nexus 1.5.9 to address an issue where license keys may be exposed to unauthorized users. The IP.Nexus patch also includes an updated SagePay payment gateway, required for all users that use Sagepay integration as of July 31, 2015, as well as an update to the Stripe payment gateway to use their "v2" javascript integration. It has been brought to our attention that specifically crafted files uploaded as attachments to IP.Board may allow for javascript to execute.  It has also been brought to our attention that specifically crafted URLs may allow for exposure of license keys otherwise kept private throughout IP.Nexus. To apply the patch Simply download the attached zip for your IP.Board version and upload the files to your forum server.   IP.Nexus 1.5.x:   IP.Board 3.4.x:   IP.Board 3.3.x: If you are an IPS Community in the Cloud client running IP.Board 3.3 or above, no further action is necessary as we have already automatically patched your account. If you are using a version older than IP.Board 3.3, you should contact support to upgrade. If you install or upgrade to IP.Board 3.4.8 or IP.Nexus 1.5.9 after the date and time of this post, no further action is necessary as we have already updated the main download zips.   We would like to thank ESET for reporting the IP.Board XSS issue to us, and we would like to thank user "vekmor" for reporting the IP.Nexus license key exposure issue to us.

    This release primarily focuses on stability with many bug fixes from both tickets and the bug tracker. In addition to dozens of fixes, important items include: When unflagging a member as a spammer, if any tasks are still queued to delete or hide the member's content the tasks will be cancelled.  This is useful if you flag a user as a spammer and then immediately change your mind and unflag the member.NO_STEP issue during upgrade should now be resolvedLists were not rebuilding correctly coming from 3.4.xChanged rebuild routines to not use internal embeds as it represents a change from the way content looked pre-upgradeThere were some infinite redirect issues in some cases when Pages was used, particularly when the gateway file was usedFixed an issue related to core_cache and the task not runningUpdate Version fixes an issue in a recent Google Chrome update that caused some pages to render poorly.
  15. Unless I'm misunderstanding, this feature is present in the Top Downloads widget.