Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(10)  |  Call(6)  |  Derive(0)  |  Import(4)
getUserId (userObject)

return (uid,resId,resIdC)

        def getUserId(user):
    getUserId (userObject)

    return (uid,resId,resIdC)

    uid = ''
    loginUser = u''
    loginUser = user.login;

    resolvers = getResolversOfUser(user)
    for reso in resolvers:
        resId = ""
        resIdC = ""
        conf = ""
        uid = user.getResolverUId(reso)
        if uid != '':
            (resId, resIdC, conf) = user.getResolverConf(reso)

        (package, module, class_, conf) = splitResolver(reso)

        if len(user.conf) > 0:
            if conf.lower() != user.conf.lower():

        ## try to load the UserIdResolver Class
            module = package + "." + module
            log.debug("[getUserId] Getting resolver class: [%r] [%r]"
                       % (module, class_))
            y = getResolverObject(reso)
            log.debug("[getUserId] Getting UserID for user %r"
                        % loginUser)
            uid = y.getUserId(loginUser)
            log.debug("[getUserId] Got UserId for user %r: %r"
                        % (loginUser, uid))

            log.debug("[getUserId] Retrieving ResolverID...")
            resId = y.getResolverId()

            resIdC = reso
            log.debug("[getUserId] Got ResolverID: %r, Loginuser: %r, "
                      "Uid: %r ]" % (resId, loginUser, uid))

            if uid != "":

        except Exception as e:
            log.error("[getUserId] module %r: %r ]" % (module, e))

    if (uid == ''):
        log.warning("[getUserId] No uid found for the user >%r< in realm %r"
                    % (loginUser, user.realm))
        raise UserError(u"getUserId failed: no user >%s< found!"
                         % unicode(loginUser), id=1205)

    log.debug("[getUserId] we are done!")
    return (unicode(uid), unicode(resId), unicode(resIdC))

src/l/i/LinOTP-   LinOTP(Download)
from linotp.lib.realm import  getDefaultRealm
from linotp.lib.user import  getUserInfo
from linotp.lib.user import  getUserId
from linotp.lib.user    import User
                    ## Now we get the attributes of the user
                    user = getUserFromParam(param, optional)
                    (uid, resId, resIdC) = getUserId(user)
                    userInfo = getUserInfo(uid, resId, resIdC)
                    #users   = getUserList({ 'username':user.getUser()} , user)

src/l/i/LinOTP-   LinOTP(Download)
from linotp.lib.user import User
from linotp.lib.user import getUserId
from linotp.lib.user import getUserInfo
        usr = User(login, realm)
        (userid, res_id, res_conf) = getUserId(usr)
        usr_detail = getUserInfo(userid, res_id, res_conf)

src/l/i/LinOTP-   LinOTP(Download)
from linotp.lib.error import ParameterError
from linotp.lib.user import getUserId, getUserInfo
from linotp.lib.user import User, getUserRealms
from linotp.lib.user import check_user_password
        if (user.isEmpty() == False):
            # the upper layer will catch / at least should
            (uid, resolver, resolverClass) = getUserId(user)
            sqlQuery = Session.query(model.Token).filter(
    if user is not None and (user.isEmpty() == False):
    # the upper layer will catch / at least should
        (userid, idResolver, idResolverClass) = getUserId(user)
    if len(userid) + len(idResolver) + len(idResolverClass) == 0:
    # the upper layer will catch / at least should
            (uid, resolver, resolverClass) = getUserId(user)
            passOnNoUser = "PassOnUserNotFound"

src/l/i/LinOTP-   LinOTP(Download)
from sqlalchemy import desc
from linotp.lib.user import getUserId
import linotp.lib.token
                                                      "with user = None")
        (uid, _resolver, resolver_class) = getUserId(user)
        r_obj = getResolverObject(resolver_class)