0

I am using Tank auth library for handling sites registration. I chose it over other options at the beginning of site building because it looked well documented and easy to use.

I need to add private messages between users. However, there is not such a functionality implemented in library.

I found CodeIgniter-Aauth library that has private messages build in. So now I see three options:

  1. Add functionality to Tank auth by myself
  2. Copy and adjust code from Aauth library into Tank auth
  3. Switch from Tank auth to Aauth

I have my website build on Tank auth so I rather avoided the last option. I have spent a couple of hour on working on every single option listed with some minor success. But it feel like I am working in million directions while actually not moving forward. I simply do not have the knowledge to decide on best course of action and the uncertainty holds me back.

So I would really appreciate if someone more experienced then myself could guide my to right direction on how to best handle private messages on my site.

Kārlis Janisels
  • 1,265
  • 3
  • 18
  • 41
  • 1
    This kind of question's aren't really suited for SO, they are primarily opinion-based and we have no real way of knowing what is the smartest option for you, only you know that. – Epodax Oct 10 '16 at 08:51
  • 1
    Sadly, I have to agree with you. Would it be better if I listed the problems I am having with adjusting code from Aauth library to Tank auth library and asked for specific problem there? – Kārlis Janisels Oct 10 '16 at 09:02
  • As long as they fit the criteria of SO and you can't solve them yourself, but I make no guarantees. – Epodax Oct 10 '16 at 09:04
  • If I were you, and I have uncertainty with something, I would go to the chat not here. Chat is better in this situations. @KārlisJanisels – MAZux Oct 10 '16 at 09:27

1 Answers1

0

Personally, I like to keep my libraries and models 'pure' in that they do a single task. It seems to me that authorization is one task, authentication is another (I know these are usually combined as you cannot do one without the other) and private messaging is quite a separate task. I have no idea why anyone would bundle those into the same library.

So I would definitely write a whole new library for private messaging between users. In that way it will work the way you want it to work, not how some half-baked generalized authentication library has decided to implement it as a bonus feature.

Edit: Just to be clear, you should pick your authentication library based on how well it does authentication, not any bonus features. You have done that so don't go back over that again, just because of additional functionality you want to add.

PaulD
  • 1,161
  • 1
  • 9
  • 14