Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/04/09 23:01:50 (15 years ago)
Author:
svonolfe
Message:

Added GetUserByLogin method for the SecurityManager (#532)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Security.Core/3.2/SecurityManager.cs

    r1738 r2020  
    120120
    121121    /// <summary>
     122    /// Gets user by his login.
     123    /// </summary>
     124    /// <param name="login"></param>
     125    /// <returns></returns>
     126    public User GetUserByLogin(string login) {
     127      try {
     128        session = factory.GetSessionForCurrentThread();
     129        IUserAdapter userAdapter = session.GetDataAdapter<User, IUserAdapter>();
     130
     131        return userAdapter.GetByLogin(login);
     132      }
     133      catch (Exception ex) { throw new FaultException("Server: " + ex.Message); }
     134      finally {
     135        if (session != null)
     136          session.EndSession();
     137      }
     138    }
     139
     140    /// <summary>
    122141    /// Add new user group.
    123142    /// </summary>
Note: See TracChangeset for help on using the changeset viewer.