Skip to content

Instantly share code, notes, and snippets.

@aqualad
Last active December 17, 2015 08:09
Show Gist options
  • Save aqualad/5578462 to your computer and use it in GitHub Desktop.
Save aqualad/5578462 to your computer and use it in GitHub Desktop.
<?php
// Validate that the email isn't used by another staff user
elseif ($this->web_enabled)
{
$rules['email'][] = [
['Model_Account_User_Site_Staff', 'unique_staff_email']];
}
@aqualad
Copy link
Author

aqualad commented May 14, 2013

Why do you do this? This creates an inconsistency in site staff members. A site staff member's email could reside in two different places: account_users or site_staff_profiles

@evanpurkhiser
Copy link

Right, the email will either exist in the staff members profile if they don't have a user account. If they do have a user account then the email will only be stored in the users details.

This is so the staff member can change their email like they normally would in their account settings without having to change it both there and in their staff profile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment