Created
January 9, 2014 23:44
-
-
Save nathanielks/8344287 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// So, I'm debating whether user_role should be defined as primary_user_role, | |
// and changed from maj_student to something like journal_host|journal_guest? | |
// that would mess up though what links are displayed in the navigation | |
// though... but that's inconsequential. there are other ways of determining | |
// how those would be selected/displayed. | |
// my journals | |
// if not a teacher, display this | |
// family/friends | |
// get_users and filter by family/friend role | |
// teachers | |
// get_users and filter by teacher role | |
// students | |
// if get_user_meta( get_current_user_id(), 'maj_teacher_students', false ) | |
// yup, I think that's what we'll do. Oh, how I enjoy refactoring... | |
// | |
// or, another option is once again to revisit primary_role being a small array | |
// of things... is_teacher could just check primary_user_role and see if | |
// maj_teacher is in it. that'd be simple enough... and won't break anything | |
// I don't think | |
// | |
// another way we could go about this would be to have a user meta of | |
// journal_owner, setting it to true or not. that'd be nice because then we | |
// wouldn't have to query the blogs table or anything. it'd be simpler and more | |
// nicely cached. and, to top it all off, we could have a filterable function | |
// that checks what user roles can own a journal and return that. I think this | |
// would combine well with having primary_role be an array of roles... just | |
// need to add a function taht would modify the user's primary role on | |
// invitation. lets change primary_user_role to user_roles while we're at it |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment