kyledjoseph / shopgab

GitHub repository for ItemNation
http://166.78.49.117/
0 stars 0 forks source link

How can I tell that if a user is new or not? #325

Closed christianbundy closed 10 years ago

christianbundy commented 10 years ago

Trying to set everything up for new users, how can I tell that they're new?

tmatthewsdev commented 10 years ago

@ChristianBundy I have a system set up to handle notices to the user. Simply pass a unique event type as a string to and instance of Model_User.

$user->has_seen_notice('custom_event_type') // false $user->mark_notice_seen('custom_event_type') // true $user->has_seen_notice('custom_event_type') // true

Let me know if you need help implementing these. Keep in mind that mark_notice_seen() should be called from a model or controller, not from a view.

christianbundy commented 10 years ago

That's awesome, I didn't even think about using events. How should I use mark_notice_seen() for user actions (such as clicks, modals, AJAX events, etc)?