best practise login function with login status code
<p>I dont know if this question was asked before , i tried to find this</p>

<p>What is the best practice to implement an account Login function that returns an account object
while if the login is not success it would return the reason of failure (account is blocked,account need verification,account doesnt exist,....)</p>

<p>currently I use C# i implement something like this and just wanted to make sure if there is a better way</p>

<pre><code>AccountBo resultAcc = null;
//this is the result account if sucessful login

LoginStatus ls = checkUserLogin(useerName, password, ref resultAcc);    
//the return value is an enum with different possible statuses
</code></pre>

<p>Thanks in advance !</p>
