Last active
December 17, 2015 08:09
-
-
Save aqualad/5578462 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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']]; | |
} |
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
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