def get_loginclass(name):
 if (__grains__['kernel'] != 'OpenBSD'):
  return False
 userinfo = __salt__['cmd.run_stdout'](['userinfo', name], python_shell=False)
 for line in userinfo.splitlines():
  if line.startswith('class'):
   try:
    ret = line.split(None, 1)[1]
    break
   except (ValueError, IndexError):
    continue
 else:
  ret = ''
 return ret

def get_loginclass ( name ) : if ( __grains__ [ 'kernel' ] != 'OpenBSD' ) : return False userinfo = __salt__ [ 'cmd.run_stdout' ] ( [ 'userinfo' , name ] , python_shell = False ) for line in userinfo . splitlines ( ) : if line . startswith ( 'class' ) : try : ret = line . split ( None , 1 ) [ 1 ] break except ( ValueError , IndexError ) : continue else : ret = '' return ret
get the login class of the user .